v3.7.0
版本发布时间: 2019-07-29 03:24:39
nlohmann/json最新发布版本:v3.11.3(2023-11-29 05:38:09)
Release date: 2019-07-28 SHA-256: a503214947952b69f0062f572cb74c17582a495767446347ce2e452963fc2ca4 (json.hpp), 541c34438fd54182e9cdc68dd20c898d766713ad6d901fb2c6e28ff1f1e7c10d (include.zip)
Summary
This release introduces a few convenience functions and performs a lot of house keeping (bug fixes and small improvements). All changes are backward-compatible.
:sparkles: New Features
- Add overload of the
contains
function to check if a JSON pointer is valid without throwing exceptions, just like its counterpart for object keys. #1600 - Add a function
to_string
to allow for generic conversion to strings. #916 #1585 - Add return value for the
emplace_back
function, returning a reference to the added element just like C++17 is introducing this forstd::vector
. #1609 - Add info how to use the library with the pacman package manager on MSYS2. #1670
:bug: Bug Fixes
- Fix an issue where typedefs with certain names yielded a compilation error. #1642 #1643
- Fix a conversion to
std::string_view
in the unit tests. #1634 #1639 - Fix MSVC Debug build. #1536 #1570 #1608
- Fix
get_to
method to clear existing content before writing. #1511 #1555 - Fix a
-Wc++17-extensions
warning.nodiscard
attributes are now only used with Clang when-std=c++17
is used. #1535 #1551
:zap: Improvements
- Switch from Catch to doctest for the unit tests which speeds up compilation and runtime of the 112,112,308 tests.
- Add an explicit section to the README about the frequently addressed topics character encoding, comments in JSON, and the order of object keys.
:hammer: Further Changes
- Use
GNUInstallDirs
to set library install directories. #1673 - Fix links in the README. #1620 #1621 #1622 #1623 #1625
- Mention
json
type on the documentation start page. #1616 - Complete documentation of
value()
function with respect totype_error.302
exception. #1601 - Fix links in the documentation. #1598
- Add regression tests for MSVC. #1543 #1570
- Use CircleCI for continuous integration.
- Use Doozer for continuous integration on Linux (CentOS, Raspbian, Fedora)
- Add tests to check each CMake flag (
JSON_BuildTests
,JSON_Install
,JSON_MultipleHeaders
,JSON_Sanitizer
,JSON_Valgrind
,JSON_NoExceptions
,JSON_Coverage
). - Use Hedley to avoid re-inventing several compiler-agnostic feature macros like
JSON_DEPRECATED
,JSON_NODISCARD
,JSON_LIKELY
,JSON_UNLIKELY
,JSON_HAS_CPP_14
, orJSON_HAS_CPP_17
. Functions taking or returning pointers are annotated accordingly when a pointer will not be null. - Build and run tests on AppVeyor in DEBUG and RELEASE mode.
: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 142.64KB
2、 include.zip.asc 833B
3、 json.hpp 782.23KB
4、 json.hpp.asc 833B