Commit graph

167 commits

Author SHA1 Message Date
Niels Lohmann
8feaf8dc94
💥 implemented new handling of NaN and INF #70 #329 #388
- If an overflow occurs during parsing a number from a JSON text, an
exception (std::out_of_range for the moment, to be replaced by a
user-defined exception #244) is thrown so that the overflow is detected
early and roundtripping is guaranteed.
- NaN and INF floating-point values can be stored in a JSON value and
are not replaced by null. That is, the basic_json class behaves like
double in this regard (no exception occurs). However, NaN and INF are
serialized to “null”.
- Adjusted test cases appropriately.
2017-03-12 18:38:05 +01:00
Niels Lohmann
87eafd8d6a
added regression tests for #473
These tests currently pass without any adjustments to the source code.
2017-03-12 15:20:17 +01:00
Niels Lohmann
89f6068385
Merge branch 'develop' into feature/exceptions_3.0.0 2017-03-12 11:51:24 +01:00
Niels Lohmann
4d7c29923e
🚑 fix for #486
Implemented std::less<value_t> to allow using value_t as std::map key
in MSVC.
2017-03-12 10:40:36 +01:00
Niels Lohmann
4e49829851
🚑 fix for #493
Added a test to check if the input stream is good() before executing
getline on it. Also added two test cases that set the failbit and
badbit before calling file_line_buffer.
2017-03-11 19:26:12 +01:00
Niels Lohmann
f4126e4dd8
added overload for std::less<value_t> #486
MSVC needs this overload to compile code containing a std::map that
uses nlohmann::detail::operator as key.
2017-03-11 15:44:14 +01:00
Niels Lohmann
f5f6dac800
added overload for std::vector<bool> #494
Adds a to_json function for std::vector<bool> to allow implicit
conversion from bit vectors to basic_json.
2017-03-11 15:32:44 +01:00
Niels Lohmann
fc9b528ec9
🔨 changed an exception 2017-03-08 18:07:21 +01:00
Niels Lohmann
5407333224
🔨 added user-defined exception 111 2017-03-06 22:37:46 +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
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
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
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
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
c8191c8172
🔨 further cleanup 2017-02-12 18:50:17 +01:00
Niels Lohmann
8d88a1da2a 🔀 merged #379 and fixed conflicts 2017-02-05 13:13:41 +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
Théo DELRIEU
3e15b551e0 run make pretty 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
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
cdd3b5a68c 🚑 fix for #416 2017-01-03 23:52:01 +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
cf9bf2d913 🚑 fix for #411 and #412 2017-01-01 15:28:01 +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
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
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
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
1ed510c232 Merge branch 'develop' into feature/filenotfound 2016-11-25 17:39:24 +01:00
Niels Lohmann
c39c36e6ad 💄 fixed indentation 2016-11-24 22:05:29 +01:00
Niels Lohmann
8014637ad1 added a test for EOF error (#367) 2016-11-24 21:53:41 +01:00
Niels Lohmann
4bb41d065b 🐛 parsing erroneous files yields an exception (#366) 2016-11-23 16:57:01 +01:00
Niels
700977d73e version bump 2016-11-02 20:52:15 +01:00
Niels
737d43724f Merge branch 'feature/issue329' into develop 2016-11-02 16:59:23 +01:00
Niels
606098f45d release 2.0.6 2016-10-15 16:47:45 +02:00
Niels
d91067220f added missing overflow check for #329 2016-10-13 21:00:48 +02:00
Niels
2fa8ea0f74 started fixing #323 2016-10-08 14:27:28 +02:00
Niels
3d104f1d43 version bump 2016-09-14 23:06:39 +02:00
Niels
6bbcdc1ec5 fixes #310 2016-09-14 22:48:12 +02:00
Niels
768d66560e version bump 2016-09-11 23:36:59 +02:00
Niels
f922426ec3 fixed #304 2016-09-11 22:40:51 +02:00
Niels
2daab5a4c2 fixed #306 2016-09-11 22:30:08 +02:00
Niels
df9fd6237e release 2.0.3 2016-08-31 21:27:23 +02:00
Niels
d80329034e split test suite in one file per test case 2016-08-04 21:55:47 +02:00