Commit Graph

1270 Commits

Author SHA1 Message Date
Niels Lohmann
3948b5b091
Merge pull request #2212 from nlohmann/comments
Add option to ignore comments in parse/accept functions
2020-06-27 12:44:51 +02:00
Niels Lohmann
4bfe4add20
Merge pull request #2203 from t-b/use-unsigned-indizies-for-array-index-in-json-pointer
Use unsigned indizies for array index in json pointer
2020-06-23 09:16:01 +02:00
Thomas Braun
ecbb2756fd json_pointer::array_index: Use unsigned values for the array index when parsing
The current code uses std::stoi to convert the input string to an int
array_index. This limits the maximum addressable array size to ~2GB on
most platforms.

But all callers immediately convert the result of array_index to
BasicJsonType::size_type.

So let's parse it as unsigned long long, which allows us to have as
big arrays as available memory. And also makes the call sites nicer to
read.

One complication arises on platforms where size_type is smaller than
unsigned long long. We need to bail out on these if the parsed array
index does not fit into size_type.
2020-06-22 13:42:55 +02:00
Niels Lohmann
29ad2178c6
Merge pull request #2176 from gracicot/cpp20-support-no-std-fct-templ-specialization
C++20 support by removing swap specialization
2020-06-21 20:39:58 +02:00
Niels Lohmann
e22ce45065
🚸 improve diagnostics 2020-06-21 13:28:00 +02:00
Niels Lohmann
139a0258cc
Merge branch 'develop' of https://github.com/nlohmann/json into comments 2020-06-21 12:40:21 +02:00
Niels Lohmann
e4675887a6
Merge branch 'develop' of https://github.com/nlohmann/json into issue2189 2020-06-20 09:47:12 +02:00
Niels Lohmann
0585ecc56b
add tests for comment skipping 2020-06-19 13:10:35 +02:00
Niels Lohmann
74520d8bb0
🚧 extend API 2020-06-17 22:03:14 +02:00
Niels Lohmann
88a37010d6
🐛 serialize 32-bit floating-point numbers as float 32 in MessagePack (0xCA) #2196 2020-06-17 21:14:23 +02:00
Niels Lohmann
e86b3fae98
🔧 add label to tests that require a git checkout 2020-06-17 12:35:59 +02:00
Niels Lohmann
4d96f4cf6a
🔧 overwork CMake files 2020-06-16 20:23:01 +02:00
Niels Lohmann
b53c6e2f81
ignore comments 2020-06-16 12:28:59 +02:00
Niels Lohmann
5f862710fe
🔖 set version to 3.8.0 2020-06-14 17:16:45 +02:00
Tanuj Garg
c3c5c03ea3 added fuzzing with different values to default argument in to_ubjson method 2020-06-10 20:50:25 +05:30
Niels Lohmann
262d9cc67d
🚨 fix a maybe-uninitialized warning 2020-06-09 16:57:06 +02:00
Niels Lohmann
2cf16625ac
add test for character types 2020-06-07 22:49:39 +02:00
Niels Lohmann
d4bc0c39af
add test for character types 2020-06-07 22:47:54 +02:00
Guillaume Racicot
82fbbeeac5 Adapted unit tests to use ADL calls for swap like the new swappable concept 2020-06-06 12:28:52 -04:00
Niels Lohmann
bf2e714e96
🚨 fix warnings 2020-06-06 14:30:17 +02:00
Niels Lohmann
7444c7fa25
Merge pull request #2145 from FrancoisChabot/1813-user-input
Fix Issue#1813: user defined input adapters
2020-06-05 14:30:39 +02:00
Niels Lohmann
dd7e25927f
🚨 fix warning 2020-06-05 08:27:15 +02:00
Niels Lohmann
5fe6b83c26
Merge pull request #2158 from dota17/output_adapter
Fix PR#1006
2020-06-05 08:25:19 +02:00
chenguoping
eca4b8785c fix test case in PR#1006 2020-06-02 15:44:26 +08:00
chenguoping
8cd39578e3 add test case 2020-06-01 11:34:03 +08:00
Francois Chabot
897061c434 amalgamate 2020-05-28 10:11:19 -04:00
Niels Lohmann
5ff4d7b7ff
Merge branch 'develop' of https://github.com/nlohmann/json into develop 2020-05-28 12:54:13 +02:00
Francois Chabot
d3caf93ab0
Merge branch 'develop' into 1813-user-input 2020-05-28 03:40:34 -04:00
Francois Chabot
3a91a05db6 added custom input to readme 2020-05-28 03:13:39 -04:00
Francois Chabot
f1969e60a3 reamalgamate 2020-05-27 12:56:26 -04:00
Francois Chabot
5684d9a498 unified input API 2020-05-27 12:40:04 -04:00
Niels Lohmann
325e8ab8ab
🔧 explicitly switch on tests in CI 2020-05-27 13:22:14 +02:00
Niels Lohmann
225fa58f16
🚧 add fix from #1715 2020-05-20 22:20:40 +02:00
Niels Lohmann
a82c80e9af
Merge pull request #2125 from nlohmann/binary_type
Clean up implementation of binary type
2020-05-20 18:58:29 +02:00
Niels Lohmann
4d39644bd0
💚 fix build 2020-05-19 13:45:52 +02:00
Niels Lohmann
21b1680ea1
🚚 rename binary_array() to binary() 2020-05-19 13:30:22 +02:00
Niels Lohmann
79347b484b
improve test coverage 2020-05-19 12:40:32 +02:00
Niels Lohmann
b7ff40029a
💥 change serialization of binary values 2020-05-18 13:53:20 +02:00
Niels Lohmann
9eb19bcc27
add more tests for binary type 2020-05-18 12:33:26 +02:00
gistrec
9e765f5aed Fixed std::numeric_limit::max() call 2020-05-18 10:25:55 +00:00
Niels Lohmann
904642f261
♻️ rename internal_binary_t with binary_t 2020-05-17 22:50:27 +02:00
Niels Lohmann
dead99eb0e
🔨 overwork binary subtypes 2020-05-17 13:51:59 +02:00
Niels Lohmann
ab6e76dd05
Merge branches 'binary_type' and 'develop' of https://github.com/nlohmann/json into binary_type 2020-05-17 12:27:58 +02:00
Niels Lohmann
28e20bd9e4
🚨 fix warnings #2113 2020-05-16 14:26:17 +02:00
Niels Lohmann
c0cf67ead3
Merge branch 'develop' of https://github.com/nlohmann/json into binary_type 2020-05-16 12:58:13 +02:00
Niels Lohmann
f40a9f876a
Merge pull request #2044 from dota17/issue#1719
Fix issue#1719
2020-05-16 12:57:00 +02:00
chenguoping
ed9c205b5d add somes test cases 2020-05-15 21:48:29 +08:00
Niels Lohmann
daf2d296dd
♻️ move wrapped binary type to separate file 2020-05-15 14:12:32 +02:00
chenguoping
779a0ec7df update 2020-05-15 17:35:43 +08:00
chenguoping
47c6570470 Add some test cases about to_cbor() 2020-05-14 15:11:38 +08:00