v3.9.1
版本发布时间: 2020-08-06 19:50:12
nlohmann/json最新发布版本:v3.11.3(2023-11-29 05:38:09)
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.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
:bug: 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 ofbasic_json
which broke existing code whenjson
was replaced byordered_json
, in particular when trying to callordered_json::parse
. #2315 #2319 #2331
:hammer: Further Changes
- Install pkg-config file to
CMAKE_CURRENT_BINARY_DIR
instead ofCMAKE_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
:fire: 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):
- 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. - 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})
.
All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
1、 include.zip 302.07KB
2、 include.zip.asc 833B
3、 json.hpp 904.52KB
4、 json.hpp.asc 833B