v3.1.1
版本发布时间: 2018-02-14 02:38:45
nlohmann/json最新发布版本:v3.11.3(2023-11-29 05:38:09)
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: 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()
.
:hammer: 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).
:fire: 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.
1、 include.zip 114.19KB
2、 include.zip.asc 833B
3、 json.hpp 577.25KB
4、 json.hpp.asc 833B