v2.1.1
版本发布时间: 2017-02-26 00:07:37
nlohmann/json最新发布版本:v3.11.3(2023-11-29 05:38:09)
Release date: 2017-02-25 SHA-256: faa2321beb1aa7416d035e7417fcfa59692ac3d8c202728f9bcc302e2d558f57
Summary
This release fixes a locale-related bug in the parser. To do so, the whole number handling (lexer, parser, and also the serialization) have been overworked. Furthermore, a lot of small changes added up that were added to this release. All changes are backward-compatible.
Changes
- :bug: Locales that have a different character than
.
as decimal separator (e.g., the Norwegian localenb_NO.UTF-8
) led to truncated number parsing or parse errors. The library now has been fixed to work with any locale. Note that.
is still the only valid decimal separator for JSON input. - :bug: Numbers like
1.0
were correctly parsed as floating-point number, but serialized as integer (1
). Now, floating-point numbers correctly round trip. - :bug: Parsing incorrect JSON numbers with leading 0 (
0123
) could yield a buffer overflow. This is fixed now by detecting such errors directly by the lexer. - :bug: Constructing a JSON value from a pointer was incorrectly interpreted as a Boolean; such code will now yield a compiler error.
- :bug: Comparing a JSON number with
0
led to a comparison withnull
. This is fixed now. - :bug: All throw calls are now wrapped in macros.
- :lock: Starting during the preparation of this release (since 8 February 2017), commits and released files are cryptographically signed with this GPG key. Previous releases have also been signed.
- :sparkles: The parser for MessagePack and CBOR now supports an optional start index parameter to define a byte offset for the parser.
- :rotating_light: Some more warnings have been fixed. With Clang, the code compiles without warnings with
-Weverything
(well, it needs-Wno-documentation-unknown-command
and-Wno-deprecated-declarations
, but you get the point). - :hammer: The code can be compiled easier with many Android NDKs by avoiding macros like
UINT8_MAX
which previously required defining a preprocessor macro for compilation. - :zap: The unit tests now compile two times faster.
- :heavy_plus_sign: Cotire is used to speed up the build.
- :pencil2: Fixed a lot of typos in the documentation.
- :memo: Added a section to the README file that lists all used third-party code/tools.
- :memo: Added a note on constructing a string value vs. parsing.
- :white_check_mark: The test suite now contains 11202597 unit tests.
- :memo: Improved the Doxygen documentation by shortening the template parameters of class
basic_json
. - :construction_worker: Removed Doozer.
- :construction_worker: Added Codacity.
- :arrow_up: Upgraded Catch to version 1.7.2.
1、 json.hpp 437.43KB
2、 json.hpp.asc 801B