v2.1.0
版本发布时间: 2017-01-29 01:44:39
nlohmann/json最新发布版本:v3.11.3(2023-11-29 05:38:09)
- Release date: 2017-01-28
- SHA-256: a571dee92515b685784fd527e38405cf3f5e13e96edbfe3f03d6df2e363a767b
Summary
This release introduces a means to convert from/to user-defined types. The release is backwards compatible.
Changes
- :sparkles: The library now offers an elegant way to convert from and to arbitrary value types. All you need to do is to implement two functions:
to_json
andfrom_json
. Then, a conversion is as simple as putting a=
between variables. See the README for more information and examples. - :sparkles: Exceptions can now be switched off. This can be done by defining the preprocessor symbol
JSON_NOEXCEPTION
or by passing-fno-exceptions
to your compiler. In case the code would usually thrown an exception,abort()
is now called. - :sparkles: Information on the library can be queried with the new (static) function
meta()
which returns a JSON object with information on the version, compiler, and platform. See the documentation for an example. - :bug: A bug in the CBOR parser was fixed which led to a buffer overflow.
- :sparkles: The function
type_name()
is now public. It allows to query the type of a JSON value as string. - :white_check_mark: Added the Big List of Naughty Strings as test case.
- :arrow_up: Updated to Catch v1.6.0.
- :memo: Some typos in the documentation have been fixed.
1、 json.hpp 425.83KB
2、 json.hpp.asc 801B