JSON for Modern C++ version 3.10.5 #3238
nlohmann
announced in
Announcements
Replies: 1 comment 3 replies
-
|
Could you release a version 3.10.6, which fixes parsing of json from iterator? (Re-add value_type detection to distinguish string types (was broken in releases 3.10.4, and 3.10.5). #3204, #3333, #3604, #3602, #3629) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Release date: 2022-01-03
SHA-256: e832d339d9e0c042e7dff807754769d778cf5d6ae9730ce21eed56de99cb5e86 (json.hpp), b94997df68856753b72f0d7a3703b7d484d4745c567f3584ef97c96c25a5798e (include.zip)
Summary
The previous version 3.10.4 introduced support to convert
std::filesystemobjects to JSON and vice versa. Unfortunately, we made the assumption that any compiler supporting C++17 would also have proper filesystem support. This was a mistake. This release introduces preprocessor checks (and means to override them) to make sure that the conversion support is only compiled if the compiler is detected to support it.All changes are backward-compatible.
💰 Note you can support this project via GitHub sponsors or PayPal.
🐛 Bug fixes
JSON_HAS_FILESYSTEMandJSON_HAS_EXPERIMENTAL_FILESYSTEMwhich can be set to0to avoid using filesystem support altogether.std::filesystem. GCC 7.5.0 with --std=c++17: filesystem: No such file or directory #3090 Apple build failed with json/single_include/nlohmann/json.hpp:4384:57: 'path' is unavailable #3097 Add C++17 copies of the test binaries #3101 std::filesystem unavailable on macOS lower deployment targets #3156 #include <filesystem> doesn't work with gcc-7 when-std=c++17is specified. #3203Warnings
⚡ Improvements
updatefunction to recursively merge objects with common keys. deep copy (or merge?) #3006 Add recursive update function #3069std::hashandstd::swapto work on anynlohmann::basic_jsonspecializations rather than justnlohmann::json. Extend std specializations #3121🔨 Further Changes
Tests and CI
Documentation
skip_commentstoignore_comments#3145 Fix FAQ hyperlink typo in readme #3148🔥 Deprecated functions
Passing iterator pairs or pointer/length pairs to parsing functions (
basic_json::parse,basic_json::accept,basic_json::sax_parse,basic_json::from_cbor,basic_json::from_msgpack,basic_json::from_ubjson,basic_json::from_bson) via initializer lists is deprecated. Instead, pass two iterators; for instance, callbasic_json::from_cbor(ptr, ptr+len)instead ofbasic_json::from_cbor({ptr, len}).The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapperare deprecated. Please use the member functionitems()instead.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.All deprecations are annotated with
HEDLEY_DEPRECATED_FORto report which function to use instead.This discussion was created from the release JSON for Modern C++ version 3.10.5.
Beta Was this translation helpful? Give feedback.
All reactions