v3.3.0
版本发布时间: 2018-10-05 19:00:51
nlohmann/json最新发布版本:v3.11.3(2023-11-29 05:38:09)
Release date: 2018-10-05 SHA-256: f1327bb60c58757a3dd2b0c9c45d49503d571337681d950ec621f8374bcc14d4 (json.hpp), 9588d63557333aaa485e92221ec38014a85a6134e7486fe3441e0541a5a89576 (include.zip)
Summary
This release adds support for GCC 4.8. Furthermore, it adds a function get_to
to write a JSON value to a passed reference. Another topic of this release was the CMake support which has been overworked and documented.
Besides, a lot of bugs have been fixed and slight improvements have been made. All changes are backward-compatible.
:sparkles: New Features
- The library can now also built with GCC 4.8. Though this compiler does not fully support C++11, it can successfully compile and run the test suite. Note that bug 57824 in GCC 4.8 still forbids to use multiline raw strings in arguments to macros. #1257
- Added new function
get_to
to write a JSON value to a passed reference. The destination type is automatically derived which allows more succinct code compared to theget
function. #1227 #1231
:bug: Bug Fixes
- Fixed a bug in the CMake file that made
target_link_libraries
to not properly includenlohmann_json
. #1243 #1245 #1260 - Fixed a warning in MSVC 2017 complaining about a constexpr if. #1204 #1268 #1272
- Fixed a bug that prevented compilation with ICPC. #755 #1222
- Improved the SFINAE correctness to fix a bug in the conversion operator. #1237 #1238
- Fixed a
-Wctor-dtor-privacy
warning. #1224 - Fixed a warning on a lambda in unevaluated context. #1225 #1230
- Fixed a bug introduced in version 3.2.0 where defining
JSON_CATCH_USER
led to duplicate macro definition ofJSON_INTERNAL_CATCH
. #1213 #1214 - Fixed a bug that prevented compilation with Clang 3.4.2 in RHEL 7. #1179 #1249
:zap: Improvements
- Added documentation on CMake integration of the library. #1270
- Changed the CMake file to use
find_package(nlohmann_json)
without installing the library. #1202 - Improved error messages in case
operator[]
is used with the wrong combination (json.exception.type_error.305) of JSON container type and argument type. Example: "cannot use operator[] with a string argument". #1220 #1221 - Added a license and version information to the Meson build file. #1252
- Removed static assertions to indicated missing
to_json
orfrom_json
functions as such assertions do not play well with SFINAE. These assertions also led to problems with GMock. #960 #1212 #1228 - The test suite now does not wait forever if run in a wrong directory and input files are not found. #1262
- The test suite does not show deprecation warnings for deprecated functions which frequently led to confusion. #1271
:hammer: Further Changes
- GCC 4.8 and Xcode 10 were added to the continuous integration suite at Travis.
- Added lgtm checks to pull requests.
- Added tests for CMake integration. #1260
: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 123.26KB
2、 include.zip.asc 833B
3、 json.hpp 635.42KB
4、 json.hpp.asc 833B