JSON for Modern C++
Release date: 2023-11-28 SHA-256: 9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6 (json.hpp), a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d (include.zip), d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d (json.tar.xz)
This release fixes some bugs found in the 3.11.2 release.
All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
nlohmann::json
. This class serves as an extension point and allows to add functionality to json node. Examples for such functionality might be metadata or additional member functions (e.g., visitors) or other application specific code. By default the parameter is set to void
and an empty base class is used. In this case the library behaves as it already did. #3110NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE
and NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE
). #3816http_archive
or git_repository
and depend on @nlohmann_json//:json
. #3709NEW
CMake policies up to CMake 3.14. This fixes a nasty deprecation warning that "Compatibility with CMake < 3.5 will be removed from a future version of CMake". #4076 #4112CMAKE_INSTALL_INCLUDEDIR
. #4194<numeric>
header include. #3717 #3718 #3719INT_MIN
/INT_MAX
, etc. with std::numeric_limits
and consistently use std
-namespaced integer types to make library work with newer GCC versions. #3722 #3723json_fwd.hpp
and Bazel build files) to release artifact include.zip
. #3727 #3728rebind
type. #3895 #3927adl_serializer::to_json
#3881 #3901size_type
is not int
. #4140_json
preceded by whitespace in a literal operator declaration". #4129 #4161_HAS_STATIC_RTTI=0
. #4046char_traits<unsigned char>
is deprecated: char_traits<T>
for T
not equal to char
, wchar_t
, char8_t
, char16_t
or char32_t
is non-standard". #4163 #4179CONTRIBUTING.md
that make pretty
is required for test updates. #4045const&
in docs. #4099std::ranges::equals
for range comparisons in test case. #3927 #3950unit-algorithm.cpp
. #4044This release does not deprecate any function. See the migration guide for help adjusting your code for future versions.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
is deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.json_pointer::operator string_t
) is deprecated. Use json_pointer::to_string
instead.operator==
and operator!=
have been deprecated. To compare a json_pointer
p
with a string s
, convert s
to a json_pointer
first and use json_pointer::operator==
or json_pointer::operator!=
. #3684All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2022-08-12 SHA-256: 665fa14b8af3837966949e8eb0052d583e2ac105d3438baba9951785512cf921 (json.hpp), e5c7a9f49a16814be27e4ed0ee900ecd0092bfb7dbfca65b5a421b774dccaaed (include.zip), 8c4b26bf4b422252e13f332bc5e388ec0ab5c3443d24399acb675e68278d341f (json.tar.xz)
This release fixes some bugs found in the 3.11.1 release. Furthermore, the of the namespace library has been re-structured.
All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
value
function which was broken for strings, size types, and nullptr
in release 3.11.0. #3652 #3655 #3663json_fwd.hpp
header to be self-contained and add it to the single-header release. #3656 #3679 #3687json_pointer
as key in associative containers. #3680 #3685contains
and at
. #3658 #3681json_pointer
and strings with ==
and !=
. These comparisons worked in 3.10.5, but were broken in 3.11.0 and 3.11.1. #3654 #3664to_json
conversion of std::vector<bool>::reference
and std::vector<bool>::const_reference
for STLs where these are the same as basic_json::boolean_t&
and basic_json::boolean_t
, respectively. #3677 #3678develop
branch. #3660 #3673json_pointer
documentation. #3692macos-10.15
image from the CI as it is removed by GitHub Actions. #3612 #3615 #3626operator==
and operator!=
. To compare a json_pointer
p
with a string s
, convert s
to a json_pointer
first and use json_pointer::operator==
or json_pointer::operator!=
. #3684The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
is deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.json_pointer::operator string_t
) is deprecated. Use json_pointer::to_string
instead.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2022-08-01 SHA-256: 9279dc616aac67efce68967f118051b50236612b90572e059783d368bd78687e (json.hpp), 9c15ca7806f863872452bfbc85fee6d1c9868117e3ea5e00a204ae961a2e1ae7 (include.zip), e6dd39f8f2da9cab11de2212acdd40b1cc1aafbe09da8c92933b911d19da3302 (json.tar.xz)
All issues are fixed in the develop
branch and will be part of the 3.11.2 release.
Version 3.11.0 moved the user-defined string literals (UDL) into namespace nlohmann::literals::json_literals
(see documentation). Unfortunately, this namespace was not imported to the global namespace by default which broke code. This release fixes this bug.
All changes are backward-compatible. See release notes of version 3.11.0 for more information on other features.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
JSON_USE_GLOBAL_UDLS
and the CMake options JSON_GlobalUDLs
to 1
to import the user-defined string literals from the nlohmann::literals::json_literals
namespace into the global namespace by default. #3644 #3645 #3646:bug: Unfortunately, this release introduced a bug that breaks existing usages of the user-defined string literals (UDL). This is fixed in version 3.11.1.
Release date: 2022-08-01 SHA-256: eb73896e9ce706ae6a62ce697dc8aca214840f70d8281779a6ea0cabe3afab3f (json.hpp), b4789050cacd110faf8b100cee82af19ad0b4d3249625f6582a60eeeb80c84a7 (include.zip), 5c8f7a4d9e9c0d565e71b6e5b0b3a12f784ffbf142e1ddc7ba86002cefb4c6ee (json.tar.xz)
Version 3.11.0 is one of the biggest releases (in terms of closed issues and merged pull requests) ever. It brings:
at
or operator[]
), avoiding unnecessary allocations.<windows.h>
.All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
std::string_view
as object keys in at
, operator[]
, value
, erase
, find
, contains
, and count
to avoid unnecessary allocations. #3423, #1529, #3558, #3564ordered_json
objects from initializer lists. #3342, #3343, #3370operator<=>
. #3207, #3446, #3472std::incrementable
. #3331, #3332std::any
from implicit conversion. #3428, #3437from_json()
for strings. #3171, #3267, #3312, #3384, #3427, #3312, #3620<ranges>
and range-v3. #3130, #3446json
to behave like float
. #3409, #3446operator<<(json_pointer)
to fix a regression after the 3.10.0 release. #3600, #3601value_type
detection to distinguish string types (was broken in releases 3.10.4, and 3.10.5). #3204, #3333, #3604, #3602, #3629NLOHMANN_DEFINE_TYPE_INTRUSIVE
and NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE
. #2819, #3143meta
output for MSVC. #3417JSON_SKIP_LIBRARY_VERSION_CHECK
). #3418json_pointer
on string type. #3415std::vector<bool>::reference
. #3533, #3534patch_inplace
function to apply patches without copying. #3581, #3596swap
by ADL to allow swapping with non-std
containers and improve error messages. #3609NLOHMANN_JSON_NAMESPACE
) to avoid ODR errors when linking different versions of the library. #1539, #3360, #3588, #3590JSON_USE_GLOBAL_UDLS
) to avoid name clashes. #1682, #3605-Wpragmas
warning in GCC <11. #3550_MSC_VER
version to check for std::filesystem
. #3240<sstream>
dependency. #3239, #3244JSON_MultipleHeader
to ON
to always use the multi-header version unless specified otherwise. #3532JSON_DISABLE_ENUM_SERIALIZATION
). #3536json.tar.xz
which can be used in FetchContent
. #3289, #3255CITATION.cff
. #3320.gitignore
. #3572.pc
and .cmake
files to share
directory. #3619windows-latest
image. #3368windows-2016
image. #3416disabled_exceptions
unit test). #3621iterator_input_adapter
advances iterators correctly. #3548<windows.h>
. #3631parse
and accept
. #3245, #3246ordered_json
. #3325, #3326FetchContent_MakeAvailable
in examples. #3345, #3351JSON_DIAGNOSTICS
in all linked objects. #3360, #3378FILE *
and add assertion. #3593json
and ordered_json
. #3443, #3599The implicit conversion from JSON Pointers to string (json_pointer::operator string_t
) has been deprecated. Use json_pointer::to_string
instead.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
is deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2022-01-03 SHA-256: e832d339d9e0c042e7dff807754769d778cf5d6ae9730ce21eed56de99cb5e86 (json.hpp), b94997df68856753b72f0d7a3703b7d484d4745c567f3584ef97c96c25a5798e (include.zip)
The previous version 3.10.4 introduced support to convert std::filesystem
objects to JSON and vice versa. Unfortunately, we made the assumption that any compiler supporting C++17 would also have proper filesystem support. This was a mistake. This release introduces preprocessor checks (and means to override them) to make sure that the conversion support is only compiled if the compiler is detected to support it.
All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
JSON_HAS_FILESYSTEM
and JSON_HAS_EXPERIMENTAL_FILESYSTEM
which can be set to 0
to avoid using filesystem support altogether.std::filesystem
. #3090 #3097 #3101 #3156 #3203update
function to recursively merge objects with common keys. #3006 #3069std::hash
and std::swap
to work on any nlohmann::basic_json
specializations rather than just nlohmann::json
. #3121Passing 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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
are deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2021-10-16 SHA-256: c9ac7589260f36ea7016d4d51a6c95809803298c7caec9f55830a0214c5f9140 (json.hpp), 62c585468054e2d8e7c2759c0d990fd339d13be988577699366fe195162d16cb (include.zip)
This release fixes two bugs introduced in release 3.10.0 and fixes the conversion of std::filesystem::path
. All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
std::find
and std::remove
as pointers which could break compilation. #3081 #3082std::filesystem::path
to JSON. Before release 3.10.3, such a conversion would trigger a stack overflow. Release 3.10.3 then further broke compilation on Windows. #3070 #3073Passing 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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
are deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2021-10-08 SHA-256: bac28658a4c9410faa55960a70c1ac541e8a51bbaae57dc395e23ca5abd3159a (json.hpp), 4ae5744bc1edd216c79f619fd49915c0e490e41b05434c2d2b89e078299f04ed (include.zip)
This release fixes two more bug introduced in release 3.10.0: the extended diagnostics triggered assertions when used with update()
or when inserting elements into arrays. All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
update()
function when used with extended diagnostics. #3007 #3008std::vector
. #2982 #2989begin()
and end()
function. #3020Passing 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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
are deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2021-08-26 SHA-256: 059743e48b37e41579ee3a92e82e984bfa0d2a9a2b20b175d04db8089f46f047 (json.hpp), 61e605be15e88deeac4582aaf01c09d616f8302edde7adcaba9261ddc3b4ceca (include.zip)
This release is made days after the 3.10.1 release due to a bug in the release script: The 3.10.1 release at GitHub contained the correct files, but the associated tag v3.10.1 points to the wrong commit. This release is made with a fixed build script. All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
-Wunused
warnings on JSON_DIAGNOSTICS
when the library is built without CMake. #2975 #2976Passing 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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
are deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2021-08-24 SHA-256: 0b628af78a2f0f3e2ff41d8dfa18314dd53831ffc2720c2944192d9f53727f4d (json.hpp), 144268f7f85afb0f0fbea7c796723c849724c975f9108ffdadde9ecedaa5f0b1 (include.zip)
This release fixes a bug introduced in release 3.10.0: the extended diagnostics triggered an assertion when used with ordered_json
. All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
ordered_json
. #2962 #2963hash.hpp
. #2948-Wextra-semi-stmt
warnings. #2957JSON_Install
is set to OFF
. #2946 #2947Passing 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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
are deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.
Release date: 2021-08-17 SHA-256: 230f3a03cefd586661ebab577a347c973d97a770afb89e22c52abc3c2a19d0a7 (json.hpp), b5e3bfad07feba218a26a4f809fbb0d1e33450524bf5d7244cabc92cf8178c69 (include.zip)
JSON for Modern C++ 3.10.0 is the first release for over a year. It contains some new features and a lot of minor changes and bug fixes.
Most notably, it introduces extended diagnostics. By defining JSON_DIAGNOSTICS
before including the json.hpp
, a JSON Pointer is added to exceptions which helps to debug issues with object access, array indices, or mismatching types.
Another important change behind the curtains is a fully overworked CI which performs a lot of checks for every commit which should allow more frequent releases in the future.
All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
Add extended diagnostics information by adding a JSON Pointer to the exception messages indicating the exact location of a invalid type errors or out-of-bound errors.
json.exception.type_error.302] (/address/housenumber) type must be number, but is string
Exceptions in the library are thrown in the local context of the JSON value they are detected. This makes detailed diagnostics messages, and hence debugging, difficult. To create better diagnostics messages, each JSON value needs a pointer to its parent value such that a global context (i.e., a path from the root value to the value that lead to the exception) can be created. That global context is then provided as a JSON Pointer.
As this global context comes at the price of storing one additional pointer per JSON value and runtime overhead to maintain the parent relation, extended diagnostics are disabled by default. They can, however, be enabled by defining the preprocessor symbol JSON_DIAGNOSTICS
to 1 before including json.hpp
. See the documentation
for more information. #932 #1508 #2562 #2838 #2866
Add a GDB pretty printer to facilitate reading basic_json
values in GDB. #1952 #2607
Add a new value store
to the cbor_tag_handler_t which allows to store the tags of CBOR values as binary subtypes. #2863 #2908
Add support for containers with non-default-constructible types. #2574 #2576
ordered_json
to be used when exceptions were switched off. #2347 #2725 #2934ordered_json
. #2490 #2512std::uint64_t
to support subtypes >255. Furthermore, the return value of the subtype()
function has been fixed to the documented value -1
in case no subtype is given. #2863 #2908json_ref
type which created null
values when compiled with -fno-elide-constructors
. #2387 #2405input_adapter
for containers in edge cases. #2553std::byte
containers. #2413 #2546 #2550 #2602 #2869to_json
in case a JSON value is reused. #2865 #2872EOF
was not found. #2755 #2756NLOHMANN_JSON_SERIALIZE_ENUM
with ordered_json
on libc++. #2491 #2825A lot of warnings have been fixed in this release. To make sure the library remains warning-free, the CI now breaks in case a warning is found in GCC (261 warning flags), Clang (flag -Weverything
with 8 exceptions), or MSVC (flag /W4
).
-Wimplicit-fallthrough
warnings. #2348 #2349-Wfloat-equal
warnings. #2909 #2911exception::what()
to fix C28204 warning. #2673 #2680-Wswitch-enum
warnings. #2927/W4
warnings as error. #2930The CI chain has been completely overworked and now runs mostly on a dedicated Docker Image that contains all relevant tools.
JSON_CI
.#define private public
hack from test files. Instead, macro JSON_PRIVATE_UNLESS_TESTED
is used in the source code which defaults to private
, but can be set to public
to test internals. #43 #913 #1985 #2352CMAKE_CXX_COMPILER
when the test suite was compiled. #2344 #2384JSON_BuildTests
and JSON_Install
by default when the library is the main project. #2513 #2514not_reproducible
to skip non-reproducible tests. #2324 #2560JSON_SystemInclude
to use SYSTEM
in target_include_directories
. #2762JSON_FastTests
(OFF
by default) to which slow test suite.is_discarded()
function. #2360 #2363using
declarations in README. #2826what()
member function of exception objects unusable in case _HAS_EXCEPTIONS=0
is set. #2824pkg-config.pc
generation. #2690JSON_HAS_CPP_11
, JSON_HAS_CPP_14
, JSON_HAS_CPP_17
, and JSON_HAS_CPP_20
. By defining any of these symbols, the internal check is overridden and the provided C++ version is unconditionally assumed. This can be helpful for compilers that only implement parts of the standard and would be detected incorrectly. #2730 #2731 #2749JSON_NO_IO
. When defined, headers <cstdio>
, <ios>
, <iosfwd>
, <istream>
, and <ostream>
are not included and parse functions relying on these headers are excluded. This is relevant for environment where these I/O functions are disallowed for security reasons (e.g., Intel Software Guard Extensions (SGX)). #2728 #2729 #2842 #2861FetchContent
and require CMake version 3.11. Removed Google Benchmark copy. Fix default branch name for Google Benchmarks. #2795 #2796is_complete_type
implementation. #2534integer_sequence
and index_sequence
implementation. #2683Passing 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, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len})
.
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapper
are deprecated. Please use the member function items()
instead.friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&)
and friend operator<<(std::ostream&, const basic_json&)
instead.All deprecations are annotated with HEDLEY_DEPRECATED_FOR
to report which function to use instead.