This page summarizes the notable changes of every release and links to the relevant documentation. The complete release notes — including all changes, the download files, and their checksums — are published on the GitHub releases page.
Fixes bugs found in 3.11.3 and adds several features. All changes are backward-compatible.
JSON_DIAGNOSTIC_POSITIONS, exposed through the new start_pos and end_pos member functions.ordered_json) and adds NLOHMANN_DEFINE_DERIVED_TYPE for derived classes.std::optional support (C++17) and lets patch, diff, and flatten work with arbitrary string types.std::filesystem::path conversions, and lowers the minimum CMake version to allow CMake 4.0.Adds features and fixes bugs found in 3.11.2. All changes are backward-compatible.
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE and NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE) and a clearer parse error for empty input.adl_serializer's to_json, initializer-list construction when size_type is not int, and many compiler warnings.Fixes bugs found in 3.11.1 and restructures the namespace. All changes are backward-compatible.
value function (broken for strings, size types, and nullptr in 3.11.0) and makes json_fwd.hpp self-contained.json_pointer as a key in associative containers and comparing it with strings.Fixes a regression from 3.11.0. All changes are backward-compatible.
operator""_json and operator""_json_pointer, which 3.11.0 had moved into a namespace by default.One of the largest releases ever. All changes are backward-compatible.
std::string_view as object keys in at, operator[], value, erase, find, contains, and count.operator<=> and <ranges>-compatible iterators.NLOHMANN_JSON_NAMESPACE) and the option to move the UDLs out of the global namespace (JSON_USE_GLOBAL_UDLS).patch_inplace, default values for the conversion macros, and an option to disable enum serialization (JSON_DISABLE_ENUM_SERIALIZATION).This release introduced a UDL regression that was fixed in 3.11.1. Full release notes.
Bug-fix release. All changes are backward-compatible.
std::filesystem conversions behind compiler-support checks (JSON_HAS_FILESYSTEM), which can be set to 0 to disable them altogether.Fixes regressions introduced in 3.10.0. All changes are backward-compatible.
std::filesystem::path conversion (which could trigger a stack overflow and broke compilation on Windows).std::find and std::remove.Fixes more regressions from 3.10.0. All changes are backward-compatible.
update and by inserting into arrays.std::vector, and allows conversion from types that only provide begin()/end().Re-release of 3.10.1, whose Git tag pointed at the wrong commit due to a bug in the release script. All changes are backward-compatible. Full release notes.
Fixes a regression from 3.10.0. All changes are backward-compatible.
ordered_json, and hardens the GDB pretty-printer.Feature release. All changes are backward-compatible.
JSON_DIAGNOSTICS) that prepend a JSON pointer to exception messages to pinpoint the offending value.cbor_tag_handler_t store option to keep CBOR tags as binary subtypes.std::byte.JSON_NO_IO to exclude the I/O headers and the JSON_HAS_CPP_* macros to override the detected C++ standard.Fixes two regressions from 3.9.0. All changes are backward-compatible.
ordered_json interface (e.g. ordered_json::parse).Feature release adding four long-requested features. All changes are backward-compatible.
parse via the ignore_comments parameter.ordered_json to preserve the insertion order of object keys.NLOHMANN_DEFINE_TYPE_* convenience macros, plus high-precision-number support for UBJSON and CBOR tag handling.Feature release. All changes are backward-compatible.
LegacyInputIterator container (3–10 % faster parsing).contains for JSON pointers and makes the binary from_cbor/from_msgpack/etc. functions respect allow_exceptions.Fixes a regression from 3.7.2 that could yield quadratic complexity in destructor calls. All changes are backward-compatible. Full release notes.
Fixes a stack overflow for deeply nested input by making the destructor iterative; parsing is now bounded only by available memory. All changes are backward-compatible. Full release notes.
Bug-fix release. All changes are backward-compatible.
std::int64_t minimum value and fixes contains for JSON pointers.items with a custom string type and makes json_pointer::back const.Convenience features and house-keeping. All changes are backward-compatible.
contains overload that checks a JSON pointer without throwing, a generic to_string, and a return value for emplace_back.Fixes a regression (GCC 7/8 compilation) and a <Windows.h> build error introduced in 3.6.0. All changes are backward-compatible. Full release notes.
Feature release. All changes are backward-compatible.
operator/, push_back, parent_pointer, …).contains function to test for an object key and greatly improves the performance of integer serialization.Feature release. All changes are backward-compatible.
items function and reading from FILE* in the parse function.eofbit handling on input streams and a bug in the BSON SAX parser.Feature release. All changes are backward-compatible.
dump (throw, replace with U+FFFD, or ignore) and the NLOHMANN_JSON_SERIALIZE_ENUM macro for enum conversion.Feature release. All changes are backward-compatible.
Feature release. All changes are backward-compatible.
std::wstring, std::u16string, std::u32string) and std::string_view (C++17), and round-tripping of std::map/std::unordered_map with non-string keys.Bug-fix release. All changes are backward-compatible.
Bug-fix release. All changes are backward-compatible.
Feature release. All changes are backward-compatible.
merge_patch.Fixes small issues in the JSON Pointer and JSON Patch implementations (invalid “copy” targets and non-integer array indices). All changes are backward-compatible. Full release notes.
First 3.x release — a major release with breaking changes (see the migration guide).
json::exception and subtypes, each with an identifier).accept function and an allow_exceptions flag for parse, and an update function to merge objects.Bug-fix release. All changes are backward-compatible.
Feature release. All changes are backward-compatible.
to_json/from_json, the meta function, and the option to switch off exceptions (JSON_NOEXCEPTION).Fixes several security-relevant bugs in the CBOR and MessagePack parsers found by OSS-Fuzz. All changes are backward-compatible. Full release notes.
Adds the CBOR and MessagePack binary formats. All changes are backward-compatible. Full release notes.
Adds the emplace and emplace_back functions and improves parsing and serialization performance. All changes are backward-compatible. Full release notes.
Fixes several parser bugs found through the “Parsing JSON is a Minefield” study (short files, encoding detection, surrogate pairs). All changes are backward-compatible. Full release notes.
Fixes operator[] for JSON pointers so that it creates missing values like the other overloads. All changes are backward-compatible. Full release notes.
Fixes a remaining stream end-of-file detection bug in the parser. All changes are backward-compatible. Full release notes.
Fixes stream end-of-file detection in the parser. All changes are backward-compatible. Full release notes.
Generalizes the parser to accept any contiguous sequence of one-byte elements and deprecates the input-stream constructor in favor of the parse function. All changes are backward-compatible. Full release notes.
Overhauls the parser (now rejecting unescaped control characters), tightens the class invariants, and cleans up the code. All changes are backward-compatible. Full release notes.
Fixes a performance regression in the dump function by adjusting the stream locale once per serialization. All changes are backward-compatible. Full release notes.
Feature release with a minor (potentially non-backward-compatible) API change from added noexcept and constexpr specifiers.
at and operator[], plus flatten and unflatten.diff and patch, unsigned 64-bit integer support, and locale-independent serialization.Bug-fix and feature release. All changes are backward-compatible.
get_ref accessor for stored values, and introduces runtime assertions.First official release. Full release notes.