v3.12.0¶
Released on 2025-04-11.
Fixes bugs found in 3.11.3 and adds several features. No public API was removed or renamed.
- Adds diagnostic byte positions via
JSON_DIAGNOSTIC_POSITIONS, exposed through the newstart_posandend_posmember functions. - Makes the conversion macros templated (so they also work with
ordered_json) and addsNLOHMANN_DEFINE_DERIVED_TYPEfor derived classes. - Adds
std::optionalsupport (C++17) and letspatch,diff, andflattenwork with arbitrary string types. - Extends the binary formats: BJData draft 3 and unsigned 64-bit integers for BSON.
- Adds multidimensional C-array conversion and UTF-8 encoded
std::filesystem::pathconversions, and raises the minimum CMake version to 3.5 and supports CMake 4.0.
API changes¶
Added (4 pages):
basic_json:end_pos,start_posmacros:JSON_DIAGNOSTIC_POSITIONS,nlohmann_define_derived_type
Changed:
basic_json::accept: Changed runtime assertion in case ofFILE*null pointers to exception in version 3.12.0.basic_json::parse: Changed runtime assertion in case ofFILE*null pointers to exception in version 3.12.0.basic_json::to_bjdata: BJData version parameter (for draft3 binary encoding) added in version 3.12.0.JSON_HAS_CPP_11, JSON_HAS_CPP_14, JSON_HAS_CPP_17, JSON_HAS_CPP_20, JSON_HAS_CPP_23, JSON_HAS_CPP_26: AddedJSON_HAS_CPP_23in version 3.12.0.NLOHMANN_JSON_NAMESPACE: Added the ABI tag_dpin version 3.12.0, and the ABI tags_bics,_psp,_snul,_sbu8,_ekmo,_dsbs,_dufio,_ns,_vns, and_vssse3in version 3.13.0 unreleased; seenlohmannNamespace.