Niels Lohmann
01d3a006b1
⬆️ updated Catch to v1.8.1
2017-03-02 18:13:19 +01:00
Niels Lohmann
06815d274e
🔨 added user-defined exceptions 104 and 105
...
These exceptions are thrown in case of parse errors in JSON patch
documents.
2017-03-02 17:55:13 +01:00
Niels Lohmann
c085e3bac2
🔨 started with user-defined exceptions #301 #244
...
Added class hierarchy for user-defined exceptions (#244 ). Integrated
parse exceptions 101-103. Parse exceptions include the byte count of
the last read character to locate the position of the error (#301 ).
2017-03-01 21:28:44 +01:00
Niels Lohmann
7b8fd864e2
🔥 removed deprecated constructor #480
...
The constructor basic_json(std::istream&, const parser_callback_t) has
been deprecated since version 2.0.0. This commit removes it together
with its code example, deprecation macro, and test cases. The code now
also compiles with -W-deprecated-declarations.
2017-03-01 17:49:03 +01:00
Niels Lohmann
d69242c6ba
💄 cleanup
...
- Added comments for the serializer class.
- Added test case for resizing of the indentation string.
- Using std::none_of to check if “.0” needs to be added to
floating-point number.
2017-02-28 19:20:50 +01:00
Niels Lohmann
224f99070b
⚡ micro-optimization of dump()
...
A lot of small changes to avoid memory allocations:
- The locale is only queried once rather than with every number
serialization.
- The indentation string is recycled between different calls.
- The string escape function avoids a copy if no escaping is necessary.
- The string escape and the space function use a complete switch case
instead of cascaded ifs.
Cachegrind measures some 15% performance improvement.
2017-02-28 16:28:22 +01:00
Niels Lohmann
54ef5f7b47
🔨 moved serialization functions to serializer class
...
The class is currently just a wrapper for an std::ostream and collects
all functions related to serialization. The next step should be
recycling of variables to avoid repetitive initialization for each
recursive dump call.
2017-02-27 21:22:39 +01:00
Niels Lohmann
bf4d744d1a
✅ more tests for meta() call
2017-02-26 14:34:58 +01:00
Niels Lohmann
d1b30250d6
✅ added missing tests
2017-02-26 11:50:52 +01:00
Niels Lohmann
27c65b860b
🔖 version 2.1.1
2017-02-25 16:34:38 +01:00
Niels Lohmann
a646c9c599
🔀 merge branch 'cotire' of https://github.com/tusharpm/json into tusharpm-cotire
2017-02-22 19:45:10 +01:00
Niels Lohmann
8cec55a271
🚧 fixed more warnings
2017-02-22 18:14:29 +01:00
Niels Lohmann
7d14f167b8
🚑 fix for #465
2017-02-20 22:48:27 +01:00
Niels Lohmann
1a6d7f5bca
🚧 try to fix some warnings in MSVC
2017-02-20 18:32:11 +01:00
Niels Lohmann
83f1d2c81b
✨ added start index for from_cbor and from_msgpack ( #462 )
2017-02-19 21:17:05 +01:00
Niels Lohmann
4151f2d297
✅ added test with thousands_sep
2017-02-19 20:08:01 +01:00
Tushar Maheshwari
85ce4d7b53
⚡ cmake compile time reduce using cotire
...
- Add prefix header
- Include catch.hpp
- Include json.hpp
- Replace private with public for all json_unit files
- Move `unit.cpp` to an object library
- cotire issue: strip whitespace from CMAKE_INCLUDE_SYSTEM_FLAG_CXX
2017-02-19 13:35:54 +05:30
Niels Lohmann
513eb3ab5f
🚧 clean up
2017-02-18 11:00:18 +01:00
Niels Lohmann
6408402ad2
🔀 merge #378 (for #362 and #454 )
2017-02-16 09:24:45 +01:00
Niels Lohmann
057b1e606b
🔀 merged #415 (fix for #414 )
2017-02-16 08:50:20 +01:00
Niels Lohmann
b9f3149451
🚑 fix for #452
2017-02-15 21:30:28 +01:00
Mihai STAN
6bf93b3d06
Merge remote-tracking branch 'upstream/develop' into develop
2017-02-15 15:00:25 +02:00
Niels Lohmann
22b9a301d6
Merge pull request #450 from nlohmann/TurpentineDistillery-feature/locale_independent_str_to_num
...
TurpentineDistillery feature/locale independent str to num
2017-02-14 07:18:35 +01:00
Niels Lohmann
c95ff863bf
⬆️ updated Catch to v1.7.2
2017-02-13 18:55:11 +01:00
Niels Lohmann
265c5b5207
🔨 more work on the number parser
2017-02-13 18:51:23 +01:00
Niels Lohmann
b84705d557
✅ improved test coverage
2017-02-12 20:14:43 +01:00
Niels Lohmann
c8191c8172
🔨 further cleanup
2017-02-12 18:50:17 +01:00
Niels Lohmann
c2d55109c1
🔨 make lexer distinguishes number types
2017-02-11 16:54:25 +01:00
Niels Lohmann
8d88a1da2a
🔀 merged #379 and fixed conflicts
2017-02-05 13:13:41 +01:00
Niels Lohmann
d284c86dd1
✅ uncommented some tests
2017-02-04 21:00:41 +01:00
Niels Lohmann
922fe693e1
⬆️ updated Catch to v1.7.0
2017-02-04 15:30:28 +01:00
Niels Lohmann
1cfdc2a753
🐛 fixed test compilation
2017-02-04 08:25:55 +01:00
Niels Lohmann
5976caf032
⚡ improved test compilation speed #445
2017-02-03 18:09:55 +01:00
Niels Lohmann
16af771277
✅ added roundtrip test for the Big List of Naughty Strings
2017-02-01 17:34:39 +01:00
Niels Lohmann
0164b10e10
✅ added missing tests found by mutate++
2017-01-29 17:18:58 +01:00
Niels Lohmann
d870826811
🔖 set version to 2.1.0
2017-01-28 16:03:35 +01:00
Mihai STAN
6198439f59
fix #414 - comparing to 0 literal
...
Overload comparison operators for all types that could be converted
to nullptr.
2017-01-24 22:33:37 +02:00
Niels Lohmann
030cf674ef
🚧 fixed a warning
2017-01-24 12:49:38 +01:00
Niels Lohmann
3857e55290
💄 ran "make pretty"
2017-01-24 12:43:43 +01:00
Théo DELRIEU
9f103d19d7
add implicit conversions test (operator T())
2017-01-22 14:23:24 +01:00
Théo DELRIEU
9f8b270ed9
fix some warnings
2017-01-22 14:07:28 +01:00
Théo DELRIEU
7f359017d2
rename template argument Json -> BasicJsonType
2017-01-21 19:12:40 +01:00
Théo DELRIEU
708eb9613b
disable reserve tests when exceptions are disabled
2017-01-21 19:12:40 +01:00
Théo DELRIEU
3e15b551e0
run make pretty
2017-01-21 16:14:22 +01:00
Théo DELRIEU
b56117b148
add noexcept tests
2017-01-21 16:14:22 +01:00
Théo DELRIEU
07bc82d3a7
put const to the left
2017-01-21 16:14:22 +01:00
Théo DELRIEU
f1482d1f01
more tests in unit-udt
2017-01-21 16:14:22 +01:00
Théo DELRIEU
b8012876a5
add noexcept checks, and some missing noexcepts
2017-01-21 16:14:22 +01:00
Théo DELRIEU
1554baa01d
attempting to fix coverage. testing that reserve is called
2017-01-21 16:14:22 +01:00
Théo DELRIEU
3494014ba0
new unit-udt.cpp tests
2017-01-21 16:14:22 +01:00
Théo DELRIEU
be6b417c87
tweak SFINAE checks for internal types (see commit body)
...
only check for public types (iterators, json_pointer)
for private ones (m_array.iterator, primitive_iterator) simply double
parentheses on relevant Catch checks
2017-01-21 16:14:22 +01:00
Théo DELRIEU
c847e0eea2
replace constructor by from/to_json: array_t
...
- tweaked a bit how `get<container<json>>` is handled
- added a from_json overload for forward list
2017-01-21 16:14:22 +01:00
Théo DELRIEU
6d427acdde
replace constructor by from/to_json: unscoped enum types
...
this also means that one can do: j.get<unscoped_enum>();
2017-01-21 16:14:22 +01:00
Théo DELRIEU
a32de3b528
replace constructor by from/to_json: number_unsigned_t
...
This commit forces a design change in custom JSONSerializer, which might
be temporary
2017-01-21 16:14:21 +01:00
Niels Lohmann
be1d3de49b
💄 moved changes to re2c file and ran make pretty
2017-01-21 16:14:21 +01:00
Théo DELRIEU
aa2679a8ce
fix tests, avoid instantiating JSONSerializer when it will not be used
2017-01-21 16:14:21 +01:00
Théo DELRIEU
d5ee5830ed
add more tests
2017-01-21 16:14:21 +01:00
Théo DELRIEU
1c21c87e6f
use u8 prefix in unit-udt.cpp
2017-01-21 16:14:21 +01:00
Théo DELRIEU
7e750ec1fa
fix msvc, by doubling parenthesis on catch assertions
2017-01-21 16:14:21 +01:00
Théo DELRIEU
3d405c6883
add support for enum classes
2017-01-21 16:14:21 +01:00
Théo DELRIEU
8e43d476d3
add more tests to unit-udt.cpp
2017-01-21 16:14:21 +01:00
Théo DELRIEU
1eafac7220
remove explicit keyword on udt-constructor
2017-01-21 16:14:21 +01:00
Théo Delrieu
c0c72b5b62
rewrite unit-udt: basic usage
2017-01-21 16:14:21 +01:00
Théo DELRIEU
60e6f822fa
add support for non-default-constructible udt
2017-01-21 16:14:21 +01:00
Théo DELRIEU
e5999c6c82
add a few tests
2017-01-21 16:14:21 +01:00
Théo DELRIEU
88819449c2
remove constraints on JSONSerializer instances, constrain correctly new methods
2017-01-21 16:14:21 +01:00
Théo DELRIEU
23bd2bce35
add is_compatible_* traits
2017-01-21 16:14:21 +01:00
Théo DELRIEU
178441cdfd
add basic test for custom serializer
2017-01-21 16:14:21 +01:00
Théo DELRIEU
2bc685f6b4
to_json and from_json takes both two arguments now
...
the first is the basic_json type, the second the user-defined type
2017-01-21 16:14:21 +01:00
Théo DELRIEU
837b81d672
renamed unit-constructor3.cpp to unit-udt.cpp
2017-01-21 16:14:21 +01:00
Théo DELRIEU
7dc268ef42
add first version for alternate implementation
2017-01-21 16:14:21 +01:00
Théo DELRIEU
4cdc61e493
move most SFINAE trickery in to/from_json_fn
2017-01-21 16:14:21 +01:00
Théo DELRIEU
fe628b585b
anonymous namespace renamed to detail
2017-01-21 16:14:21 +01:00
Théo Delrieu
b443edf49e
add first version support for user-defined types
2017-01-21 16:14:20 +01:00
Niels Lohmann
1ab26ab367
✨ option to switch off exceptions
2017-01-16 22:11:07 +01:00
Niels Lohmann
a7f3938391
✅ added Big List of Naughty Strings
2017-01-16 20:03:50 +01:00
Niels Lohmann
3a9ccfac22
🚧 cleanup
2017-01-12 21:35:27 +01:00
Niels Lohmann
98ad3c3ac1
Merge branch 'develop' into feature/release_information
2017-01-12 21:30:08 +01:00
Niels Lohmann
0f03543861
⬆️ upgraded to Catch 1.6.0
2017-01-11 22:23:02 +01:00
Niels Lohmann
e9bbf5aaba
🐛 forgot to remove a test case
2017-01-08 09:31:40 +01:00
Niels Lohmann
dd45ba6f89
🚧 renamed version()
to meta()
2017-01-08 09:19:44 +01:00
Alex Astashyn
c236b596c9
Merge upstream/develop into feature/locale_independent_str_to_num
2017-01-04 19:20:16 -05:00
Alex Astashyn
949061079a
Merge upstream/develop into feature/locale_independent_num_to_str
2017-01-04 18:55:19 -05:00
Niels Lohmann
e1b89dd1d6
Merge branch 'develop' into feature/release_information
2017-01-04 20:06:23 +01:00
Niels Lohmann
cdd3b5a68c
🚑 fix for #416
2017-01-03 23:52:01 +01:00
Niels Lohmann
f8d640b185
👷 better support for OSS-Fuzz
2017-01-03 22:35:31 +01:00
Niels Lohmann
245a69d554
💄 ran clang-tidy
2017-01-03 21:33:23 +01:00
Niels Lohmann
ea4d71ee21
Merge branch 'develop' into feature/release_information
2017-01-02 17:26:00 +01:00
Niels Lohmann
8b46eb8ec0
📄 it's 2017 already
2017-01-02 09:40:00 +01:00
Niels Lohmann
60b3703c62
🔖 version bump to 2.0.10
2017-01-02 09:35:57 +01:00
Niels Lohmann
d173517212
💄 clean up
2017-01-02 09:21:26 +01:00
Niels Lohmann
a3063c2419
🚧 added target to build all fuzzers
2017-01-01 21:51:36 +01:00
Niels Lohmann
09b91406c6
🔀 merge pull request #410 from Daniel599/feature/clang_sanitize
...
Feature/clang sanitize
2017-01-01 19:45:11 +01:00
Niels Lohmann
cf9bf2d913
🚑 fix for #411 and #412
2017-01-01 15:28:01 +01:00
Daniel Cohen
ff3221a375
#394 fixed memory leak in unit-allocator, found by clang's fsanitize
2016-12-30 15:21:25 +02:00
Niels Lohmann
328eb55dc4
🚧 started working on #397
2016-12-30 14:02:51 +01:00
Niels Lohmann
d7029c37aa
✅ improved test coverage
2016-12-30 13:04:33 +01:00
Niels Lohmann
f0edab2363
🚑 fix for #408
2016-12-29 17:00:02 +01:00
Niels Lohmann
383a29a924
🚑 fix for #407
2016-12-29 16:14:15 +01:00
Niels Lohmann
871cebaf84
🚑 fix for #405
2016-12-29 15:39:16 +01:00
Niels Lohmann
1dd99d04b6
Merge branch 'develop' into feature/fuzzer
2016-12-28 12:19:12 +01:00
Niels Lohmann
888f5b9f60
🚚 renamed test files to allow windows build
2016-12-28 12:18:48 +01:00
Niels Lohmann
55be721615
Merge branch 'develop' into feature/fuzzer
2016-12-28 12:11:51 +01:00
Niels Lohmann
acb7e0558d
🚑 fixed bugs detected by AFL-Fuzz
2016-12-28 12:09:15 +01:00
Niels Lohmann
1399abc583
🚧 added MessagePack fuzz target
2016-12-25 16:18:56 +01:00
Niels Lohmann
6de9d4035a
🐛 fixed AFL driver to also read binary data
2016-12-25 16:06:56 +01:00
Niels Lohmann
33be4e7f1f
🚧 cleanup
2016-12-22 12:08:36 +01:00
Niels Lohmann
a084e90f39
🔨 split AFL test in driver and test file
2016-12-22 11:09:26 +01:00
Niels Lohmann
048330b14b
⬆️ Catch v1.5.9
2016-12-22 09:37:15 +01:00
Niels Lohmann
22a6b956e8
📄 added license for Catch
2016-12-22 09:36:34 +01:00
Niels Lohmann
ad241a2260
🔨 moved third-party code into separate folder
2016-12-22 09:35:53 +01:00
Niels Lohmann
6e8791912f
🚧 added fuzzer from OSS-Fuzz
2016-12-22 09:09:40 +01:00
Niels Lohmann
69ed19e483
➕ added libFuzzer
2016-12-22 09:08:50 +01:00
Niels Lohmann
303e873ae8
🔖 bumped version to 2.0.9
2016-12-16 20:45:46 +01:00
Niels Lohmann
2f94c30bad
✅ added a regression test for #380 / #390
2016-12-13 21:46:07 +01:00
Alex Astashyn
6fba52b6da
Merged upstream/develop into feature/locale_independent_str_to_num
2016-12-12 20:27:15 -05:00
Alex Astashyn
65b9b0c429
Disabling snprintf pre-check, since can't get locale-specific behavior to manifest in AppVeyor
2016-12-12 19:50:21 -05:00
Alex Astashyn
0f8de48ddb
Disabling strtod pre-check, since can't get locale-specific behavior to manifest in AppVeyor
2016-12-12 19:48:14 -05:00
Niels Lohmann
79fa8b2f41
🚑 fix to address #389
2016-12-12 23:19:43 +01:00
Niels Lohmann
447e01427d
🚨 fixed some warnings
2016-12-12 18:21:17 +01:00
Niels Lohmann
dc6fc3e079
📝 clean up and added documentation for #358
2016-12-11 13:36:08 +01:00
Niels Lohmann
fdce38fa79
✅ fixed a test case
2016-12-11 00:39:26 +01:00
Niels Lohmann
e8c903294f
✅ more test cases for CBOR and msgpack
2016-12-11 00:05:29 +01:00
Niels Lohmann
41673e8fed
🐛 fixed CBOR code and added test cases
2016-12-10 23:12:57 +01:00
Niels Lohmann
d99c230f51
✨ implemented indefinite-length CBOR types ( #387 )
2016-12-10 18:32:56 +01:00
Alex Astashyn
01930357f7
Tweaking unit test, as digits grouping is failing to be invoked in CI
2016-12-08 22:39:38 -05:00
Alex Astashyn
1c029b97c0
Still trying to invoke locale-specific behavior in CI
2016-12-08 22:13:05 -05:00
Alex Astashyn
50f0484ad5
Added unit test for issue #378
2016-12-07 20:23:25 -05:00
Alex Astashyn
27d9740ad6
Tweaks to unit-test for issue #379
2016-12-07 19:55:07 -05:00
Niels Lohmann
81a4272444
✅ more test cases for CBOR
2016-12-07 23:14:37 +01:00
Niels Lohmann
3a0f5398a2
✅ more CBOR test cases
2016-12-07 22:50:10 +01:00
Niels Lohmann
b7e0c12966
✨ CBOR support for half-precision floats
2016-12-07 21:43:59 +01:00
Niels Lohmann
17c9b17a7e
✅ test cases from RFC 7049 #384
2016-12-07 21:25:22 +01:00
Niels Lohmann
de289ea336
💚 another approach to the AppVeyor error
2016-12-07 19:15:05 +01:00
Niels Lohmann
81c43dca6a
💚 more AppVeyor fixes
2016-12-07 16:51:15 +01:00
Niels Lohmann
3f14a09e73
💚 another try to fix the AppVeyor build
2016-12-07 16:43:55 +01:00
Niels Lohmann
74571d531c
💚 still fixing the AppVeyor error
2016-12-07 16:34:02 +01:00
Niels Lohmann
2c7946f2bc
💚 hopefully fixed an error on AppVeyor
2016-12-07 16:21:22 +01:00
Niels Lohmann
474da6b28f
✅  more msgpack test cases
2016-12-07 13:47:08 +01:00
Niels Lohmann
be973e52bb
✅ more msgpack test cases
2016-12-07 09:19:46 +01:00
Niels Lohmann
a1693bfe48
Merge branch 'develop' into feature/messagepack
2016-12-07 08:39:57 +01:00
Alex Astashyn
6774457733
Trying to coerce setlocale to make snprintf use commas as delimiter some more
2016-12-06 22:59:12 -05:00
Alex Astashyn
d2e9ce270a
Trying to coerce setlocale to make snprintf use commas as delimiter; the behavior appears to be compiler/platform-specific
2016-12-06 22:18:20 -05:00
Alex Astashyn
6e8da7d8c4
Added unit-test for issue #379 (locale-independent str-to-num)
2016-12-06 19:45:48 -05:00
Alex Astashyn
2197856395
Fixed suffixing .0 and modified the unit tests accordingly
2016-12-04 01:38:23 -05:00
Alex Astashyn
6b78b5c2be
Added strtonum for locale-independent number parsing
2016-12-03 19:05:09 -05:00
Niels Lohmann
4adb8a81bf
📝 version bump
2016-12-02 18:39:35 +01:00
Niels Lohmann
ba3c5e1a25
✅ more test cases
2016-11-29 09:49:05 +01:00
Niels Lohmann
c46b4ea990
✅ more test cases
2016-11-29 08:37:27 +01:00
Niels Lohmann
ee0f23fdc6
🚧 bug fixes and more tests
2016-11-28 23:20:03 +01:00