json v3.9.1 Release Notes

Release Date: 2020-08-06 // 11 months ago
  • ๐Ÿš€ Release date: 2020-08-06
    SHA-256: 7804b38146921d03374549c9e2a5e3acda097814c43caf2b96a0278e58df26e0 (json.hpp), 6bea5877b1541d353bd77bdfbdb2696333ae5ed8f9e8cc22df657192218cad91 (include.zip)

    Summary

    This release fixes two bugs in the features introduced in release 3.9.0. The lexer did not accept consecutive comments , and ordered_json lacked some functions from json. All changes are backward-compatible.

    ๐Ÿ‘Œ ๐Ÿ’ฐ Note you can support this project via GitHub sponsors or PayPal.

    ๐Ÿฑ ๐Ÿ› Bug Fixes

    • The lexer did not accept input with two or more consecutive comments (e.g. /* one */ /* two */ []). #2330 #2332
    • The newly introduced ordered_json container did not implement the complete interface of basic_json which broke existing code when json was replaced by ordered_json, in particular when trying to call ordered_json::parse. #2315 #2319 #2331

    ๐Ÿฑ ๐Ÿ”จ Further Changes

    • Install pkg-config file to CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR #2318
    • Make installation directory of pkg-config file depend on CMAKE_INSTALL_LIBDIR. #2314
    • ๐Ÿ›  Fix -Wimplicit-fallthrough warning. #2333
    • ๐Ÿ›  Fix name of Homebrew formula in documentation. #2326 #2327
    • ๐Ÿ›  Fix typo in documentation. #2320

    ๐Ÿฑ ๐Ÿ”ฅ Deprecated functions

    ๐Ÿšš The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):

    ๐Ÿ—„ All deprecations are annotated with HEDLEY_DEPRECATED_FOR to report which function to use instead.


Previous changes from v3.9.0

  • Full Changelog

    • Unknown Type Name clang error when using NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE #2313
    • โš  Clang 10.0 / GCC 10.1 warnings on disabled exceptions #2304
    • Application stalls indefinitely with message byte size 10 #2293
    • ๐Ÿ”— linker error #2292
    • โž• Add support for high-precision numbers in UBJSON encoding #2286
    • NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE fails if the length of the argument is 10 #2280
    • Custom types : MACRO expansion bug #2267
    • to/from_json Failing To Convert String #2238
    • โš  clang 9.0 report warning: unused type alias 'size_type' [-Wunused-local-typedef] #2221
    • Enormous array created when working with map<int,T> #2220
    • Can I disable sorting of json values #2219
    • Getting Qt types to work #2217
    • Convert to Qt QVariant #2216
    • How to custom serialize same data type of vector? #2215
    • ๐Ÿ‘ json constructor does not support std::optional #2214
    • ๐Ÿ“œ Failing to Parse Valid JSON #2209
    • (De-)Serialization of std::variant with namespaces #2208
    • โž• Addint support for complex type #2207
    • array_index possible out of range #2205
    • Object deserialized as array #2204
    • Sending to a function a reference to a sub-branch #2200
    • How to Serialize derived class to JSON object? #2199
    • JSON incorrectly serialized #2198
    • Exception Unhandled out_of_range error #2197
    • msgpack serialisation : float is treated as 64bit float, not 32bit float. #2196
    • Is it possible to use compile-time type guarantees for JSON structures? #2195
    • ๐ŸŽ Question : performance against python dict #2194
    • vs2017 compile error #2192
    • Check if a key exists #2191
    • ๐Ÿ— Failed to run tests due to missing test data on builders without Internet access #2190
    • โœ… 3.8.0: unit-cbor.cpp test failures #2189
    • 'nlohmann/json.hpp' file not found #2188
    • How to send json data over the wire? #2185
    • ๐Ÿ‘ Ubuntu 16 not supporting nlohmann/json? #2184
    • .get<std::string> causing emdash errors #2180
    • Object properties should not be re-sorted alphabetically #2179
    • Custom type registration : instrusive API #2175
    • Many version of the function "void to_json(json& j, const MyStruct& struct)" #2171
    • How should strings be escaped? #2155
    • โž• Adding a value to an existing json puts it at the beginning instead of the end #2149
    • The header file is big, can we use what we need. #2134
    • 0๏ธโƒฃ Changing the default format for unordered_map (or other set) #2132
    • Getting size of deserialized bson document #2131
    • implicit conversion failure #2128
    • ๐Ÿ“œ Error thrown when parsing in a subclass #2124
    • explicit conversion to string not considered for std::map keys in GCC8 #2096
    • โž• Add support for JSONC #2061
    • Library provides template arg for string_type but assumes std::string in some places #2059
    • ๐Ÿ“œ incremental parsing with sax_parser #2030
    • Question about flatten and unflatten #1989
    • ๐Ÿ“œ CBOR parser doesn't skip tags #1968
    • ๐Ÿ Compilation failure using Clang on Windows #1898
    • ๐Ÿ— Fail to build when including json.hpp as a system include #1818
    • ๐Ÿ“œ Parsing string into json doesn't preserve the order correctly. #1817
    • [C++17] Allow std::optional to convert to nlohmann::json #1749
    • How can I save json object in file in order? #1717
    • ๐Ÿ‘Œ Support for Comments #1513
    • clang compiler: error : unknown type name 'not' #1119
    • dump() without alphabetical order #1106
    • operator T() considered harmful #958
    • Order of the elements in JSON object #952
    • How to prevent alphabetical sorting of data? #727
    • Why is an object ordering values by Alphabetical Order? #660
    • ๐Ÿ”‹ Feature request: Comments #597
    • Head Elements Sorting #543
    • Automatic ordered JSON #424
    • ๐Ÿ‘Œ Support for comments. #376
    • ๐Ÿ‘ Optional comment support. #363
    • Strip comments / Minify #294
    • maintaining order of keys during iteration #106

    • ๐Ÿ“š Update documentation #2312 (nlohmann)

    • ๐Ÿ›  Fix bug in CBOR tag handling #2308 (nlohmann)

    • added inline to NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE macro #2306 (jwittbrodt)

    • ๐Ÿ›  fixes unused variable 'ex' for #2304 #2305 (AODQ)

    • โž• Add test with multiple translation units #2301 (nlohmann)

    • ๐Ÿ”€ Merge GitHub actions #2300 (nlohmann)

    • ๐Ÿ›  Fix unused parameter #2299 (nlohmann)

    • โž• Add support for high-precision numbers in UBJSON encoding #2297 (nlohmann)

    • fix eof for get_binary and get_string #2294 (jprochazk)

    • Serialisation macros: increase upper bound on number of member variables #2287 (pfeatherstone)

    • โž• add inline specifier for detail::combine #2285 (T0b1-iOS)

    • โž• Add static assertion for missing binary function in SAX interface #2282 (nlohmann)

    • Add test for target_include_directories #2279 (nlohmann)

    • ๐Ÿ‘• Clean up maintainer Makefiles and fix some linter warnings #2274 (nlohmann)

    • โž• Add option to ignore CBOR tags #2273 (nlohmann)

    • Hash function without allocation #2269 (nlohmann)

    • โž• Add ClangCL for MSVC #2268 (t-b)

    • ๐Ÿ‘‰ Makefile: Always use SED variable #2264 (t-b)

    • โž• Add Xcode 12 CI #2262 (nlohmann)

    • ๐Ÿ Make library work with Clang on Windows #2259 (nlohmann)

    • โž• Add ordered_json specialization with ordered object keys #2258 (nlohmann)

    • โž• Add pkg-config file #2253 (ericonr)

    • ๐Ÿ›  Fix regression from #2181 #2251 (nlohmann)

    • ๐Ÿท Tag binary values in cbor if set #2244 (matthewbauer)

    • ๐Ÿ”ง Make assert configurable via JSON_ASSERT #2242 (nlohmann)

    • โž• Add specialization of get_to #2233 (nlohmann)

    • ๐Ÿ“š Refine documentation of error_handler parameter #2232 (nlohmann)

    • Simplify conversion from/to custom types #2225 (nlohmann)

    • โœ‚ Remove unused typedefs #2224 (nlohmann)

    • Enable CMake policy CMP0077 #2222 (alexreinking)

    • โž• Add option to ignore comments in parse/accept functions #2212 (nlohmann)

    • ๐Ÿ›  Fix Clang-Tidy warnings #2211 (nlohmann)

    • ๐Ÿ‘ Simple ordered_json that works on all supported compilers #2206 (gatopeich)

    • ๐Ÿ‘‰ Use unsigned indizies for array index in json pointer #2203 (t-b)

    • โž• Add option to not rely on Internet connectivity during test stage #2202 (nlohmann)

    • Serialize floating-point numbers with 32 bit when possible (MessagePack) #2201 (nlohmann)

    • Fix consistency in function int\_to\_string\(\) #2193 (dota17)

    • ๐Ÿ›  Fix issue#1275 #2181 (dota17)

    • ๐Ÿ‘ C++20 support by removing swap specialization #2176 (gracicot)

    • Feat/explicit conversion operator #1559 (theodelrieu)