json v3.1.1 Release Notes
Release Date: 2018-02-13 // about 6 years ago-
๐ Release date: 2018-02-13
SHA-256: e14ce5e33d6a2daf748026bd4947f3d9686ca4cfd53d10c3da46a0a9aceb7f2e (json.hpp), fde771d4b9e4f222965c00758a2bdd627d04fb7b59e09b7f3d1965abdc848505 (include.zip)Summary
๐ This release fixes several bugs in the library. All changes are backward-compatible.
๐ฑ ๐ Bug Fixes
- Fixed parsing of CBOR strings with indefinite length (#961). Earlier versions of this library misinterpreted the CBOR standard and rejected input with the
0x7F
start byte. - Fixed user-defined conversion to vector type (#924, #969). A wrong SFINAE check rejected code though a user-defined conversion was provided.
- Fixed documentation of the parser behavior for objects with duplicate keys (#963). The exact behavior is not specified by RFC 8259 and the library now also provides no guarantee which object key is stored.
- ๐ Added check to detect memory overflow when parsing UBJSON containers (#962). The optimized UBJSON format allowed for specifying an array with billions of
null
elements with a few bytes and the library did not check whether this size exceededmax_size()
.
๐ฑ ๐จ Further Changes
- Code coverage is now calculated for the individual header files, allowing to find uncovered lines more quickly than by browsing through the single header version (#953, #957).
- ๐ A Makefile target
run_benchmarks
was added to quickly build and run the benchmark suite. - ๐ The documentation was harmonized with respect to the header inclusion (#955). Now all examples and the README use
#include <nlohmann/json.hpp>
to allow for selectingsingle_include
orinclude
or whatever installation folder as include directory. - โ Added note on how to use the library with the cget package manager (#954).
๐ฑ ๐ฅ Deprecated functions
๐ This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
- Function
iterator_wrapper
are deprecated. Please use the member functionitems()
instead. - Functions
friend std::istream& operator<<(basic_json&, std::istream&)
andfriend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please usefriend std::istream& operator>>(std::istream&, basic_json&)
andfriend operator<<(std::ostream&, const basic_json&)
instead.
- Fixed parsing of CBOR strings with indefinite length (#961). Earlier versions of this library misinterpreted the CBOR standard and rejected input with the