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 exceeded max_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 selecting single_include or include 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):