nlohmann
released this
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 like1.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 with0led 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 likeUINT8_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 classbasic_json.👷 Removed Doozer.👷 Added Codacity.⬆️ Upgraded Catch to version 1.7.2.