v3.5.0
版本发布时间: 2018-12-22 07:03:42
nlohmann/json最新发布版本:v3.11.3(2023-11-29 05:38:09)
Release date: 2018-12-22 SHA-256: 8a6dbf3bf01156f438d0ca7e78c2971bca50eec4ca6f0cf59adf3464c43bb9d5 (json.hpp), 3564da9c5b0cf2e032f97c69baedf10ddbc98030c337d0327a215ea72259ea21 (include.zip)
Summary
This release introduces the support for structured bindings and reading from FILE*
. Besides, a few bugs have been fixed. All changes are backward-compatible.
:sparkles: New Features
-
Structured bindings are now supported for JSON objects and arrays via the
items()
member function, so finally this code is possible:for (auto& [key, val] : j.items()) { std::cout << key << ':' << val << '\n'; }
#1388 #1391
-
Added support for reading from
FILE*
to support situations in which streams are nit available or would require too much RAM. #1370 #1392
:bug: Bug Fixes
- The
eofbit
was not set for input streams when the end of a stream was reached while parsing. #1340 #1343 - Fixed a bug in the SAX parser for BSON arrays.
:zap: Improvements
- Added support for Clang 5.0.1 (PS4 version). #1341 #1342
:hammer: Further Changes
- Added a warning for implicit conversions to the documentation: It is not recommended to use implicit conversions when reading from a JSON value. Details about this recommendation can be found here. #1363
- Fixed typos in the documentation. #1329 #1380 #1382
- Fixed a C4800 warning. #1364
- Fixed a
-Wshadow
warning #1346 - Wrapped
std::snprintf
calls to avoid error in MSVC. #1337 - Added code to allow installation via Meson. #1345
: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 133.29KB
2、 include.zip.asc 833B
3、 json.hpp 693.36KB
4、 json.hpp.asc 833B