1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-25 13:41:56 +03:00
Commit Graph

112 Commits

Author SHA1 Message Date
14cd019861 fix cmake install directory (for real this time)
* Rename 'develop' folder to 'include/nlohmann'
* Rename 'src' folder to 'single_include/nlohmann'
* Use <nlohmann/*> headers in sources and tests
* Change amalgamate config file
2018-02-01 11:06:51 +01:00
92484f0caf 🔖 set version to 3.0.1 2017-12-29 18:31:13 +01:00
9e3c4ad11f 🔖 set version to 3.0.0 2017-12-17 08:31:18 +01:00
546e148b24 Further performance improvements, and corrections in get_token_string
o An (-'ve valued, typically -1) EOF must never be allowed in
  token_string, as it be converted to 255 -- a legitimate value.
o Comparing against a specific eof() (-1, typically) is more costly than
  detecting +'ve/-'ve.  Since EOF is the only non-positive value allowed
  we can use the simpler test.
o Removed unnecessary test for token_string size, as it is already
  tested in the method, and must never occur in correct code; used an
  assert instead.
2017-10-05 16:16:41 -07:00
b90529c36d improved test coverage 2017-09-13 18:56:54 +02:00
b21d7810fa improved test coverage 2017-09-09 16:53:27 +02:00
9ae6796a38 improved test coverage 2017-09-09 13:07:10 +02:00
fd250ae2b1 improved test coverage 2017-09-09 11:04:58 +02:00
7d51214045 implemented exception-free parser #458 #582
You can now pass a boolean "allow_exceptions" to the parse functions. If it is false, no exceptions are thrown in case of a parse error. Instead, parsing is stopped at the first error and a JSON value of type "discarded" (check with is_discarded()) is returned.
2017-07-27 20:33:11 +02:00
9b1c058810 🔨 reorganized interfaces for parse/accept functions #623
We now rely on implicit conversions to an input_adapter object in the parse/accept functions.
2017-07-23 18:11:34 +02:00
c7a69ae03e started working on parser with provded result reference #418
Internally, the parser now writes its result into a JSON value provided as a reference. To be usable, the public interfaces need to be extended.
2017-07-22 15:18:38 +02:00
15625ca4a7 move input adapters outside of basic_json 2017-07-09 21:21:12 +02:00
8b123107c0 🔨 fixed some pedantic GCC warnings 2017-07-07 22:41:22 +02:00
e99b783def 🔨 simplifying scanner 2017-06-22 16:40:15 +02:00
6f3bebff5c 🔨 removed unexpect function 2017-06-21 07:26:50 +02:00
e191dd833f 🔨 fixed warning about pointer members 2017-06-20 21:09:05 +02:00
82b95ca664 🔨 simplified error handling in parser 2017-06-20 20:14:18 +02:00
112a6f4e53 🔨 replaced lexer's error message by const char* 2017-06-18 13:03:14 +02:00
723c875604 💬 replaced "backspace" with "backslash" #509 2017-05-13 19:56:38 +02:00
8b9f51179e started working on #458
a simple acceptor function
2017-04-24 17:46:21 +02:00
db9bf953f3 🔨 improved diagnostic output 2017-04-15 10:40:10 +02:00
186a9fd44d 🔨 simplified interface for parser, lexer, and binary_reader
These classes are now constructed with an interface adapter. This moves
complexity from various places into the interface adapter class, or to
some factories which now implement the different flavors of input.

Furthermore, input adapters are kept in std::shared_ptr to avoid the
need of manual deletion.
2017-04-09 19:28:15 +02:00
50ee0a62f5 🔨 replaced lookup-tables by switches 2017-03-31 23:24:33 +02:00
bbb6bd9de5 🔨 fixing last failing test cases 2017-03-28 17:00:03 +02:00
06e2a291b1 🔨 fixed number parsing 2017-03-26 17:26:41 +02:00
3b069b4b4c 🔨 adjusted more expected exceptions 2017-03-26 16:19:07 +02:00
99e0d8b339 🔨 fixed \uxxxx parsing 2017-03-26 15:29:08 +02:00
40160f482a 🚧 manual lexer
This commit removed the re2c lexer and replaced it by a manual version.
Its integration is not yet complete: number parsing does not respect
locales or overflows. Furthermore, parsing does not need to end with
EOF. Therefore, a lot of test cases fail. The idea is to push this
branch forward so we can conduct performance comparisons. So far, a
nice side effect are better diagnosis messages in case of parse errors.
2017-03-24 19:49:02 +01:00
c5711f3072 🚧 a lot of minor changes
- Removed unused headers.
- Added override where needed.
- Added description for parse_error.113 exception.
- Fixed some conversion warnings.
- Integrated cbor_expect_string function for CBOR maps.
- Added documentation on the supported CBOR/MessagePack features.
- Added test to check all initial bytes for CBOR input.
2017-03-16 18:39:33 +01:00
84072fbd6d 💄 fixed indentation 2017-03-14 16:07:28 +01:00
c5cf32e34d 🔨 added user-defined exception 406 2017-03-12 20:59:33 +01:00
855cdcf05c 🔀 merge branch 'develop' into feature/exceptions_3.0.0 2017-03-12 20:22:30 +01:00
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
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
27c65b860b 🔖 version 2.1.1 2017-02-25 16:34:38 +01:00
513eb3ab5f 🚧 clean up 2017-02-18 11:00:18 +01:00
b9f3149451 🚑 fix for #452 2017-02-15 21:30:28 +01:00
265c5b5207 🔨 more work on the number parser 2017-02-13 18:51:23 +01:00
b84705d557 improved test coverage 2017-02-12 20:14:43 +01:00
0164b10e10 added missing tests found by mutate++ 2017-01-29 17:18:58 +01:00
d870826811 🔖 set version to 2.1.0 2017-01-28 16:03:35 +01:00
8b46eb8ec0 📄 it's 2017 already 2017-01-02 09:40:00 +01:00
60b3703c62 🔖 version bump to 2.0.10 2017-01-02 09:35:57 +01:00
303e873ae8 🔖 bumped version to 2.0.9 2016-12-16 20:45:46 +01:00
4adb8a81bf 📝 version bump 2016-12-02 18:39:35 +01:00
700977d73e version bump 2016-11-02 20:52:15 +01:00
606098f45d release 2.0.6 2016-10-15 16:47:45 +02:00
3d104f1d43 version bump 2016-09-14 23:06:39 +02:00
768d66560e version bump 2016-09-11 23:36:59 +02:00
df9fd6237e release 2.0.3 2016-08-31 21:27:23 +02:00