Repository navigation
JSON for Modern C++ Version 2.1.1
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
- π 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. - π Numbers like
1.0were correctly parsed as floating-point number, but serialized as integer (1). Now, floating-point numbers correctly round trip. - π 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. - π Constructing a JSON value from a pointer was incorrectly interpreted as a Boolean; such code will now yield a compiler error.
- π Comparing a JSON number with
0led to a comparison withnull. This is fixed now. - π All throw calls are now wrapped in macros.
- π 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.
- β¨ The parser for MessagePack and CBOR now supports an optional start index parameter to define a byte offset for the parser.
- π¨ Some more warnings have been fixed. With Clang, the code compiles without warnings with
-Weverything(well, it needs-Wno-documentation-unknown-commandand-Wno-deprecated-declarations, but you get the point). - π¨ The code can be compiled easier with many Android NDKs by avoiding macros like
UINT8_MAXwhich previously required defining a preprocessor macro for compilation. - β‘ The unit tests now compile two times faster.
- β Cotire is used to speed up the build.
- βοΈ Fixed a lot of typos in the documentation.
- π Added a section to the README file that lists all used third-party code/tools.
- π Added a note on constructing a string value vs. parsing.
- β The test suite now contains 11202597 unit tests.
- π Improved the Doxygen documentation by shortening the template parameters of class
basic_json. - π· Removed Doozer.
- π· Added Codacity.
- β¬οΈ Upgraded Catch to version 1.7.2.