This commit is contained in:
nlohmann committed 2026-10-24 17:31:11 +00:00
1 parent 7130ea885a
commit 39c2507b2a
629 files changed
+3665 -1648

No files matched your search

+1
View File
@@ -0,0 +1 @@
<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=author content="Niels Lohmann"><link href="https://json.nlohmann.me/home/releases/unreleased/" rel="canonical"><link href=../ rel=prev><link href=../v3.12.0/ rel=next><link rel=icon href=../../../assets/images/favicon.png><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.7.7"><title>Unreleased - JSON for Modern C++</title><link rel=stylesheet href=../../../assets/stylesheets/main.ec1eaa64.min.css><link rel=stylesheet href=../../../assets/stylesheets/palette.ab4e12ef.min.css><link rel="stylesheet" href="../../../assets/external/fonts.googleapis.com/css.61a430c9.css"><style>:root{--md-text-font:"Roboto";--md-code-font:"JetBrains Mono"}</style><link rel=stylesheet href=../../../css/custom.css><script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head> <body dir=ltr data-md-color-scheme=default data-md-color-primary=indigo data-md-color-accent=indigo> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#unreleased class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class=md-header data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=../../.. title="JSON for Modern C++" class="md-header__button md-logo" aria-label="JSON for Modern C++" data-md-component=logo> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> JSON for Modern C++ </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> Unreleased </span> </div> </div> </div> <form class=md-header__option data-md-component=palette> <input class=md-option data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme=default data-md-color-primary=indigo data-md-color-accent=indigo aria-label="Switch to dark mode" type=radio name=__palette id=__palette_0> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_1 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme=slate data-md-color-primary=indigo data-md-color-accent=indigo aria-label="Switch to light mode" type=radio name=__palette id=__palette_1> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_0 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> </form> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <label class="md-header__button md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> </label> <div classLine truncated
+139
View File
@@ -0,0 +1,139 @@
# Unreleased
These changes are part of the `develop` branch, but not of a release yet.
- Converting an rvalue container to JSON (`json j = std::move(vec);`, `json j = std::map<std::string, std::string>{...};`) now **moves** the elements instead of copying them (e.g., `std::vector<std::string>` with 100,000 strings: 4.7 ms to 2.3 ms). Two consequences: the source container is left in a valid but unspecified (moved-from) state, and if an exception is thrown during the conversion, the source may be partially moved-from, so the strong exception guarantee no longer holds for the source of an rvalue conversion (the JSON value itself is unaffected). Lvalues and `const` objects are still copied. See [`basic_json`](https://json.nlohmann.me/api/basic_json/basic_json/index.md).
## API changes
**Added (90 pages):**
- `basic_json`: [`as_base_class`](https://json.nlohmann.me/api/basic_json/as_base_class/index.md), [`format_as(basic_json)`](https://json.nlohmann.me/api/basic_json/format_as/index.md), [`from_bon8`](https://json.nlohmann.me/api/basic_json/from_bon8/index.md), [`merge_diff`](https://json.nlohmann.me/api/basic_json/merge_diff/index.md), [`basic_json>`](https://json.nlohmann.me/api/basic_json/std_formatter/index.md), [`to_bon8`](https://json.nlohmann.me/api/basic_json/to_bon8/index.md), [`with_t`](https://json.nlohmann.me/api/basic_json/with_t/index.md)
- `basic_json_document`: [(overview)](https://json.nlohmann.me/api/basic_json_document/index.md), [`accept`](https://json.nlohmann.me/api/basic_json_document/accept/index.md), [`basic_json_document`](https://json.nlohmann.me/api/basic_json_document/basic_json_document/index.md), [`erase`](https://json.nlohmann.me/api/basic_json_document/erase/index.md), [`insert`](https://json.nlohmann.me/api/basic_json_document/insert/index.md), [`is_discarded`](https://json.nlohmann.me/api/basic_json_document/is_discarded/index.md), [`load`](https://json.nlohmann.me/api/basic_json_document/load/index.md), [`memory_usage`](https://json.nlohmann.me/api/basic_json_document/memory_usage/index.md), [`node_count`](https://json.nlohmann.me/api/basic_json_document/node_count/index.md), [`owns_source`](https://json.nlohmann.me/api/basic_json_document/owns_source/index.md), [`parse`](https://json.nlohmann.me/api/basic_json_document/parse/index.md), [`parse_copy`](https://json.nlohmann.me/api/basic_json_document/parse_copy/index.md), [`push_back`](https://json.nlohmann.me/api/basic_json_document/push_back/index.md), [`read`](https://json.nlohmann.me/api/basic_json_document/read/index.md), [`root`](https://json.nlohmann.me/api/basic_json_document/root/index.md), [`save`](https://json.nlohmann.me/api/basic_json_document/save/index.md), [`set`](https://json.nlohmann.me/api/basic_json_document/set/index.md), [`shrink_to_fit`](https://json.nlohmann.me/api/basic_json_document/shrink_to_fit/index.md), [`source`](https://json.nlohmann.me/api/basic_json_document/source/index.md)
- `basic_json_view`: [(overview)](https://json.nlohmann.me/api/basic_json_view/index.md), [`at`](https://json.nlohmann.me/api/basic_json_view/at/index.md), [`back`](https://json.nlohmann.me/api/basic_json_view/back/index.md), [`basic_json_view`](https://json.nlohmann.me/api/basic_json_view/basic_json_view/index.md), [`begin`](https://json.nlohmann.me/api/basic_json_view/begin/index.md), [`cbegin`](https://json.nlohmann.me/api/basic_json_view/cbegin/index.md), [`cend`](https://json.nlohmann.me/api/basic_json_view/cend/index.md), [`contains`](https://json.nlohmann.me/api/basic_json_view/contains/index.md), [`count`](https://json.nlohmann.me/api/basic_json_view/count/index.md), [`dump`](https://json.nlohmann.me/api/basic_json_view/dump/index.md), [`empty`](https://json.nlohmann.me/api/basic_json_view/empty/index.md), [`end`](https://json.nlohmann.me/api/basic_json_view/end/index.md), [`find`](https://json.nlohmann.me/api/basic_json_view/find/index.md), [`front`](https://json.nlohmann.me/api/basic_json_view/front/index.md), [`get`](https://json.nlohmann.me/api/basic_json_view/get/index.md), [`get_string`](https://json.nlohmann.me/api/basic_json_view/get_string/index.md), [`get_to`](https://json.nlohmann.me/api/basic_json_view/get_to/index.md), [`is_array`](https://json.nlohmann.me/api/basic_json_view/is_array/index.md), [`is_binary`](https://json.nlohmann.me/api/basic_json_view/is_binary/index.md), [`is_boolean`](https://json.nlohmann.me/api/basic_json_view/is_boolean/index.md), [`is_discarded`](https://json.nlohmann.me/api/basic_json_view/is_discarded/index.md), [`is_null`](https://json.nlohmann.me/api/basic_json_view/is_null/index.md), [`is_number`](https://json.nlohmann.me/api/basic_json_view/is_number/index.md), [`is_number_float`](https://json.nlohmann.me/api/basic_json_view/is_number_float/index.md), [`is_number_integer`](https://json.nlohmann.me/api/basic_json_view/is_number_integer/index.md), [`is_number_unsigned`](https://json.nlohmann.me/api/basic_json_view/is_number_unsigned/index.md), [`is_object`](https://json.nlohmann.me/api/basic_json_view/is_object/index.md), [`is_primitive`](https://json.nlohmann.me/api/basic_json_view/is_primitive/index.md), [`is_string`](https://json.nlohmann.me/api/basic_json_view/is_string/index.md), [`is_structured`](https://json.nlohmann.me/api/basic_json_view/is_structured/index.md), [`items`](https://json.nlohmann.me/api/basic_json_view/items/index.md), [`materialize`](https://json.nlohmann.me/api/basic_json_view/materialize/index.md), [`number_format`](https://json.nlohmann.me/api/basic_json_view/number_format/index.md), [`number_token`](https://json.nlohmann.me/api/basic_json_view/number_token/index.md), [`operator[]`](https://json.nlohmann.me/api/basic_json_view/operator%5B%5D/index.md), [`operator==`](https://json.nlohmann.me/api/basic_json_view/operator_eq/index.md), [`operator<<`](https://json.nlohmann.me/api/basic_json_view/operator_ltlt/index.md), [`operator!=`](https://json.nlohmann.me/api/basic_json_view/operator_ne/index.md), [`size`](https://json.nlohmann.me/api/basic_json_view/size/index.md), [`source_offset`](https://json.nlohmann.me/api/basic_json_view/source_offset/index.md), [`type`](https://json.nlohmann.me/api/basic_json_view/type/index.md), [`type_name`](https://json.nlohmann.me/api/basic_json_view/type_name/index.md), [`value`](https://json.nlohmann.me/api/basic_json_view/value/index.md)
- `json_pointer`: [`front`](https://json.nlohmann.me/api/json_pointer/front/index.md), [`pop_front`](https://json.nlohmann.me/api/json_pointer/pop_front/index.md), [`push_front`](https://json.nlohmann.me/api/json_pointer/push_front/index.md)
- `macros`: [`JSON_BRACE_INIT_COPY_SEMANTICS`](https://json.nlohmann.me/api/macros/json_brace_init_copy_semantics/index.md), [`JSON_DELETE_DEPRECATED_FUNCTIONS`](https://json.nlohmann.me/api/macros/json_delete_deprecated_functions/index.md), [`JSON_DISABLE_STREAM_BULK_SCAN`](https://json.nlohmann.me/api/macros/json_disable_stream_bulk_scan/index.md), [`JSON_DISABLE_TUPLE_REFERENCE_CONVERSION`](https://json.nlohmann.me/api/macros/json_disable_tuple_reference_conversion/index.md), [`JSON_DISABLE_UNLOCKED_FILE_IO`](https://json.nlohmann.me/api/macros/json_disable_unlocked_file_io/index.md), [`JSON_HAS_RANGE_VIEW_CONVERSION`](https://json.nlohmann.me/api/macros/json_has_range_view_conversion/index.md), [`JSON_HAS_STD_FORMAT`](https://json.nlohmann.me/api/macros/json_has_std_format/index.md), [`JSON_NO_AUTOMATIC_UDLS`](https://json.nlohmann.me/api/macros/json_no_automatic_udls/index.md), [`JSON_NO_SIMD`](https://json.nlohmann.me/api/macros/json_no_simd/index.md), [`JSON_NO_THREAD_LOCAL`](https://json.nlohmann.me/api/macros/json_no_thread_local/index.md), [`JSON_PRECISE_STREAM_POSITION`](https://json.nlohmann.me/api/macros/json_precise_stream_position/index.md), [`JSON_STRICT_BINARY_UTF8`](https://json.nlohmann.me/api/macros/json_strict_binary_utf8/index.md), [`JSON_STRICT_NUL_HANDLING`](https://json.nlohmann.me/api/macros/json_strict_nul_handling/index.md), [`JSON_USE_OBJECTS_FOR_ENUM_KEYED_MAPS`](https://json.nlohmann.me/api/macros/json_use_objects_for_enum_keyed_maps/index.md), [`JSON_USE_SIMDUTF`](https://json.nlohmann.me/api/macros/json_use_simdutf/index.md), [`JSON_VIEW_NO_SIMD`](https://json.nlohmann.me/api/macros/json_view_no_simd/index.md), [`JSON_VIEW_USE_SSSE3`](https://json.nlohmann.me/api/macros/json_view_use_ssse3/index.md), [`nlohmann_define_type_with_names`](https://json.nlohmann.me/api/macros/nlohmann_define_type_with_names/index.md)
**Changed:**
- [`operator>>(basic_json)`](https://json.nlohmann.me/api/operator_gtgt/index.md): Fixed a null pointer dereference for an `std::istream` without a stream buffer (now throws `parse_error.101`), and a crash (`std::terminate`) when `i` has `eofbit` in its exception mask, in version 3.13.0 unreleased.
- [`operator>>(basic_json)`](https://json.nlohmann.me/api/operator_gtgt/index.md): Changed to the strong exception safety guarantee in version 3.13.0 unreleased: `j` is no longer left with a partially parsed value if parsing throws.
- [`operator>>(basic_json)`](https://json.nlohmann.me/api/operator_gtgt/index.md): Scans the characters in the stream buffer of `i` in bulk in version 3.13.0 unreleased; the position of `i` after the call is unchanged ([`JSON_DISABLE_STREAM_BULK_SCAN`](https://json.nlohmann.me/api/macros/json_disable_stream_bulk_scan/index.md) restores reading one character at a time).
- [`operator""_json`](https://json.nlohmann.me/api/operator_literal_json/index.md): Added `char8_t*` overload in version 3.13.0 unreleased.
- [`operator""_json_pointer`](https://json.nlohmann.me/api/operator_literal_json_pointer/index.md): Added `char8_t*` overload in version 3.13.0 unreleased.
- [`ordered_map`](https://json.nlohmann.me/api/ordered_map/index.md): Changed in version 3.13.0 unreleased: growing the storage moves the mapped values instead of copying them.
- [`basic_json::accept`](https://json.nlohmann.me/api/basic_json/accept/index.md): Added `ignore_trailing_commas` in version 3.13.0 unreleased.
- [`basic_json::accept`](https://json.nlohmann.me/api/basic_json/accept/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::accept`](https://json.nlohmann.me/api/basic_json/accept/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::accept`](https://json.nlohmann.me/api/basic_json/accept/index.md): Parsing from an `std::istream` scans the characters in its stream buffer in bulk in version 3.13.0 unreleased ([`JSON_DISABLE_STREAM_BULK_SCAN`](https://json.nlohmann.me/api/macros/json_disable_stream_bulk_scan/index.md)).
- [`basic_json::accept`](https://json.nlohmann.me/api/basic_json/accept/index.md): Parsing from a `FILE*` locks the file once instead of once per character in version 3.13.0 unreleased ([`JSON_DISABLE_UNLOCKED_FILE_IO`](https://json.nlohmann.me/api/macros/json_disable_unlocked_file_io/index.md)).
- [`basic_json::array_t`](https://json.nlohmann.me/api/basic_json/array_t/index.md): Made `capacity()` optional, so that array types such as `std::deque` can be used, in version 3.13.0 unreleased.
- [`basic_json::at`](https://json.nlohmann.me/api/basic_json/at/index.md): Overload 3: Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
- [`basic_json::basic_json`](https://json.nlohmann.me/api/basic_json/basic_json/index.md): Overload 4: Explicit for different string types if `JSON_USE_IMPLICIT_CONVERSIONS` is `0` since version 3.13.0 unreleased.
- [`basic_json::basic_json`](https://json.nlohmann.me/api/basic_json/basic_json/index.md): Overload 7: Fixed in version 3.13.0 unreleased to also check the iterator range for binary values; before, a range that did not cover the whole value (such as `(end(), end())`) was accepted and the whole binary value was copied, unlike the other primitive types.
- [`basic_json::binary_t`](https://json.nlohmann.me/api/basic_json/binary_t/index.md): Fixed [`dump`](https://json.nlohmann.me/api/basic_json/dump/index.md), [`std::hash`](https://json.nlohmann.me/api/basic_json/std_hash/index.md), and [`to_ubjson`](https://json.nlohmann.me/api/basic_json/to_ubjson/index.md) for byte types that are not integers (e.g., `std::byte`) in version 3.13.0 unreleased.
- [`basic_json::clear`](https://json.nlohmann.me/api/basic_json/clear/index.md): Fixed in version 3.13.0 unreleased to also clear the subtype of a binary value; before, the subtype was left unchanged.
- [`basic_json::contains`](https://json.nlohmann.me/api/basic_json/contains/index.md): Overload 2: Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
- [`basic_json::contains`](https://json.nlohmann.me/api/basic_json/contains/index.md): Overload 4: Deleted overloads for integral key types added in version 3.13.0 unreleased to reject such calls at compile time instead of causing undefined behavior at runtime.
- [`basic_json::count`](https://json.nlohmann.me/api/basic_json/count/index.md): Overload 2: Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
- [`basic_json::count`](https://json.nlohmann.me/api/basic_json/count/index.md): Overload 3: Deleted overload for integral key types added in version 3.13.0 unreleased to reject such calls at compile time instead of causing undefined behavior at runtime.
- [`basic_json::dump`](https://json.nlohmann.me/api/basic_json/dump/index.md): Error handler `keep` added in version 3.13.0 unreleased.
- [`basic_json::dump`](https://json.nlohmann.me/api/basic_json/dump/index.md): Doubles are written with the shortest digits (Żmij instead of Grisu2) since version 3.13.0 unreleased; about 0.1% of doubles are written differently, most of them with fewer digits.
- [`basic_json::emplace`](https://json.nlohmann.me/api/basic_json/emplace/index.md): Fixed in version 3.13.0 unreleased: for [`ordered_json`](https://json.nlohmann.me/api/ordered_json/index.md), the value could previously only be passed as an rvalue; it can now also be passed as an lvalue or a `const` lvalue, matching the behavior of `json`.
- [`basic_json::erase`](https://json.nlohmann.me/api/basic_json/erase/index.md): Overload 4: Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
- [`basic_json::error_handler_t`](https://json.nlohmann.me/api/basic_json/error_handler_t/index.md): Added `keep`, and made this enumeration apply to the binary readers and writers in addition to `dump`, in version 3.13.0 unreleased.
- [`basic_json::find`](https://json.nlohmann.me/api/basic_json/find/index.md): Overload 2: Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
- [`basic_json::find`](https://json.nlohmann.me/api/basic_json/find/index.md): Overload 3: Deleted overloads for integral key types added in version 3.13.0 unreleased to reject such calls at compile time instead of causing undefined behavior at runtime.
- [`basic_json::from_bjdata`](https://json.nlohmann.me/api/basic_json/from_bjdata/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::from_bjdata`](https://json.nlohmann.me/api/basic_json/from_bjdata/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::from_bjdata`](https://json.nlohmann.me/api/basic_json/from_bjdata/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::from_bson`](https://json.nlohmann.me/api/basic_json/from_bson/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::from_bson`](https://json.nlohmann.me/api/basic_json/from_bson/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::from_bson`](https://json.nlohmann.me/api/basic_json/from_bson/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::from_cbor`](https://json.nlohmann.me/api/basic_json/from_cbor/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::from_cbor`](https://json.nlohmann.me/api/basic_json/from_cbor/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::from_cbor`](https://json.nlohmann.me/api/basic_json/from_cbor/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::from_msgpack`](https://json.nlohmann.me/api/basic_json/from_msgpack/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::from_msgpack`](https://json.nlohmann.me/api/basic_json/from_msgpack/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::from_msgpack`](https://json.nlohmann.me/api/basic_json/from_msgpack/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::from_ubjson`](https://json.nlohmann.me/api/basic_json/from_ubjson/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::from_ubjson`](https://json.nlohmann.me/api/basic_json/from_ubjson/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::from_ubjson`](https://json.nlohmann.me/api/basic_json/from_ubjson/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::get_to`](https://json.nlohmann.me/api/basic_json/get_to/index.md): Added a `static_assert` with a clear message for `const` arguments in version 3.13.0 unreleased.
- [`basic_json::insert`](https://json.nlohmann.me/api/basic_json/insert/index.md): Overload 4: Fixed in version 3.13.0 unreleased to copy the values before inserting; before, an `ilist` that referred to elements of the array being inserted into could insert wrong values, because the range insert could move from or shift an element before it was copied.
- [`basic_json::json_base_class_t`](https://json.nlohmann.me/api/basic_json/json_base_class_t/index.md): Made a public member type in version 3.13.0 unreleased; it was private before, so it could not be named outside the class.
- [`basic_json::merge_patch`](https://json.nlohmann.me/api/basic_json/merge_patch/index.md): Fixed use of freed or relocated memory when `apply_patch` is `*this` or refers to a value contained in `*this`, in version 3.13.0 unreleased.
- [`basic_json::number_unsigned_t`](https://json.nlohmann.me/api/basic_json/number_unsigned_t/index.md): Can be the same type as `number_integer_t` since version 3.13.0 unreleased.
- [`basic_json::object_comparator_t`](https://json.nlohmann.me/api/basic_json/object_comparator_t/index.md): Fixed the fallback to `default_object_comparator_t`, which previously failed to compile for object types without a `key_compare` member type, in version 3.13.0 unreleased.
- [`basic_json::object_t`](https://json.nlohmann.me/api/basic_json/object_t/index.md): Allowed object types whose `erase(iterator)` returns `void` in version 3.13.0 unreleased.
- [`basic_json::operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md): Overload 1: Fixed in version 3.13.0 unreleased to throw `std::length_error` instead of emptying the array and accessing it out of bounds when `idx` equals the maximum value of `size_type`.
- [`basic_json::operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md): Overload 1: A missing index in the const version is guarded by a runtime assertion since version 3.13.0 unreleased.
- [`basic_json::operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md): Overload 3: Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
- [`basic_json::operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md): Overload 4: A missing array index in the const version is guarded by a runtime assertion since version 3.13.0 unreleased.
- [`basic_json::operator==`](https://json.nlohmann.me/api/basic_json/operator_eq/index.md): Overload 2: Made conditionally `noexcept` in version 3.13.0 unreleased; before, a throwing conversion called `std::terminate`.
- [`basic_json::operator>=`](https://json.nlohmann.me/api/basic_json/operator_ge/index.md): Overload 2: Made conditionally `noexcept` in version 3.13.0 unreleased; before, a throwing conversion called `std::terminate`.
- [`basic_json::operator>`](https://json.nlohmann.me/api/basic_json/operator_gt/index.md): Overload 2: Made conditionally `noexcept` in version 3.13.0 unreleased; before, a throwing conversion called `std::terminate`.
- [`basic_json::operator<=`](https://json.nlohmann.me/api/basic_json/operator_le/index.md): Overload 2: Made conditionally `noexcept` in version 3.13.0 unreleased; before, a throwing conversion called `std::terminate`.
- [`basic_json::operator<`](https://json.nlohmann.me/api/basic_json/operator_lt/index.md): Overload 2: Made conditionally `noexcept` in version 3.13.0 unreleased; before, a throwing conversion called `std::terminate`.
- [`basic_json::operator!=`](https://json.nlohmann.me/api/basic_json/operator_ne/index.md): Overload 1: Changed in version 3.13.0 unreleased to remove special-casing for `NaN` and `discarded` values; `operator!=` now consistently means `!(a == b)`.
- [`basic_json::operator!=`](https://json.nlohmann.me/api/basic_json/operator_ne/index.md): Overload 1: Removed the C++20 member function in version 3.13.0 unreleased; since C++20, the compiler rewrites `a != b` using `operator==`.
- [`basic_json::operator!=`](https://json.nlohmann.me/api/basic_json/operator_ne/index.md): Overload 2: Changed in version 3.13.0 unreleased to remove special-casing for `NaN` and `discarded` values; `operator!=` now consistently means `!(a == b)`.
- [`basic_json::operator!=`](https://json.nlohmann.me/api/basic_json/operator_ne/index.md): Overload 2: Made conditionally `noexcept` in version 3.13.0 unreleased; before, a throwing conversion called `std::terminate`.
- [`basic_json::operator<=>`](https://json.nlohmann.me/api/basic_json/operator_spaceship/index.md): Overload 2: Made conditionally `noexcept` in version 3.13.0 unreleased; before, a throwing conversion called `std::terminate`.
- [`basic_json::parse`](https://json.nlohmann.me/api/basic_json/parse/index.md): Added `ignore_trailing_commas` in version 3.13.0 unreleased.
- [`basic_json::parse`](https://json.nlohmann.me/api/basic_json/parse/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::parse`](https://json.nlohmann.me/api/basic_json/parse/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::parse`](https://json.nlohmann.me/api/basic_json/parse/index.md): Extended empty-input detection to also cover an `std::istream` without a stream buffer, and fixed a crash (`std::terminate`) when parsing from an `std::istream` with `eofbit` in its exception mask, in version 3.13.0 unreleased.
- [`basic_json::parse`](https://json.nlohmann.me/api/basic_json/parse/index.md): Parsing from an `std::istream` scans the characters in its stream buffer in bulk in version 3.13.0 unreleased ([`JSON_DISABLE_STREAM_BULK_SCAN`](https://json.nlohmann.me/api/macros/json_disable_stream_bulk_scan/index.md) restores reading one character at a time).
- [`basic_json::parse`](https://json.nlohmann.me/api/basic_json/parse/index.md): Parsing from a `FILE*` locks the file once instead of once per character in version 3.13.0 unreleased ([`JSON_DISABLE_UNLOCKED_FILE_IO`](https://json.nlohmann.me/api/macros/json_disable_unlocked_file_io/index.md) restores `std::fgetc`).
- [`basic_json::parser_callback_t`](https://json.nlohmann.me/api/basic_json/parser_callback_t/index.md): Fixed in version 3.13.0 unreleased to also remove discarded values from a parent object; before, discarding an array or a value stored under an object key left a discarded member behind, which made the parse result serialize to invalid JSON.
- [`basic_json::parser_callback_t`](https://json.nlohmann.me/api/basic_json/parser_callback_t/index.md): Fixed in version 3.13.0 unreleased so that discarding an array or object at its start event also hides its content from the callback, as documented above; before, the callback was still called for the content, and the key of every member of a discarded object was kept in memory until the parse ended.
- [`basic_json::patch`](https://json.nlohmann.me/api/basic_json/patch/index.md): Added [`out_of_range.411`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range411) and stopped relying on an internal assertion when an "add" operation's target location has a non-object/non-array parent in version 3.13.0 unreleased.
- [`basic_json::patch`](https://json.nlohmann.me/api/basic_json/patch/index.md): Added [`out_of_range.413`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range413) and stopped silently ignoring a "remove" operation whose target location has a non-object/non-array parent in version 3.13.0 unreleased.
- [`basic_json::patch`](https://json.nlohmann.me/api/basic_json/patch/index.md): Added [`out_of_range.414`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range414) and rejected a "move" operation whose "from" location is a proper prefix of its "path" location instead of silently producing a corrupted result in version 3.13.0 unreleased.
- [`basic_json::patch`](https://json.nlohmann.me/api/basic_json/patch/index.md): Throws [`parse_error.109`](https://json.nlohmann.me/home/exceptions/#jsonexceptionparse_error109) instead of [`out_of_range.404`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range404) for a one-character array index that is not a digit (e.g., `/x`) in version 3.13.0 unreleased, as it already did for longer ones.
- [`basic_json::patch_inplace`](https://json.nlohmann.me/api/basic_json/patch_inplace/index.md): Added [`out_of_range.411`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range411) and stopped relying on an internal assertion when an "add" operation's target location has a non-object/non-array parent in version 3.13.0 unreleased.
- [`basic_json::patch_inplace`](https://json.nlohmann.me/api/basic_json/patch_inplace/index.md): Added [`out_of_range.413`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range413) and stopped silently ignoring a "remove" operation whose target location has a non-object/non-array parent in version 3.13.0 unreleased.
- [`basic_json::patch_inplace`](https://json.nlohmann.me/api/basic_json/patch_inplace/index.md): Added [`out_of_range.414`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range414) and rejected a "move" operation whose "from" location is a proper prefix of its "path" location instead of silently producing a corrupted result in version 3.13.0 unreleased.
- [`basic_json::patch_inplace`](https://json.nlohmann.me/api/basic_json/patch_inplace/index.md): Throws [`parse_error.109`](https://json.nlohmann.me/home/exceptions/#jsonexceptionparse_error109) instead of [`out_of_range.404`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range404) for a one-character array index that is not a digit (e.g., `/x`) in version 3.13.0 unreleased, as it already did for longer ones.
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): Added `ignore_trailing_commas` in version 3.13.0 unreleased.
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): Added `tag_handler` in version 3.13.0 unreleased.
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0 unreleased.
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): `JSON_PRECISE_STREAM_POSITION` added in version 3.13.0 unreleased to optionally leave a `std::istream` positioned right after the parsed value when `strict` is `false`.
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): Parsing from an `std::istream` scans the characters in its stream buffer in bulk in version 3.13.0 unreleased ([`JSON_DISABLE_STREAM_BULK_SCAN`](https://json.nlohmann.me/api/macros/json_disable_stream_bulk_scan/index.md)).
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): Parsing from a `FILE*` locks the file once instead of once per character in version 3.13.0 unreleased ([`JSON_DISABLE_UNLOCKED_FILE_IO`](https://json.nlohmann.me/api/macros/json_disable_unlocked_file_io/index.md)).
- [`std::hash<nlohmann::basic_json>`](https://json.nlohmann.me/api/basic_json/std_hash/index.md): Numbers that compare equal hash equally since version 3.13.0 unreleased; before, `0`, `0U`, and `0.0` had different hash values.
- [`basic_json::string_t`](https://json.nlohmann.me/api/basic_json/string_t/index.md): Removed the requirement that `string_t` be implicitly convertible from `std::string`, which the BSON writer and the UBJSON reader relied on, in version 3.13.0 unreleased.
- [`basic_json::swap`](https://json.nlohmann.me/api/basic_json/swap/index.md): Overload 1: Exchanges the `json_base_class_t` subobject along with the value since version 3.13.0 unreleased.
- [`basic_json::swap`](https://json.nlohmann.me/api/basic_json/swap/index.md): Overload 2: Exchanges the `json_base_class_t` subobject along with the value since version 3.13.0 unreleased.
- [`basic_json::to_bjdata`](https://json.nlohmann.me/api/basic_json/to_bjdata/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::to_bjdata`](https://json.nlohmann.me/api/basic_json/to_bjdata/index.md): Throws `type_error.321` for a discarded value since version 3.13.0 unreleased; previously, a discarded value nested in an array or object was silently skipped, producing invalid BJData.
- [`basic_json::to_bson`](https://json.nlohmann.me/api/basic_json/to_bson/index.md): Throws `out_of_range.412` and `out_of_range.415` since version 3.13.0 unreleased.
- [`basic_json::to_bson`](https://json.nlohmann.me/api/basic_json/to_bson/index.md): Linear in the size of `j`, and no longer limited by the call stack for deeply nested values, since version 3.13.0 unreleased.
- [`basic_json::to_bson`](https://json.nlohmann.me/api/basic_json/to_bson/index.md): `out_of_range.415` is now detected before anything is written, like the other exceptions above, since version 3.13.0 unreleased.
- [`basic_json::to_bson`](https://json.nlohmann.me/api/basic_json/to_bson/index.md): Throws `type_error.321` for a discarded value nested in `j` since version 3.13.0 unreleased; previously, it was silently skipped, producing a document whose declared size did not match what was actually written.
- [`basic_json::to_bson`](https://json.nlohmann.me/api/basic_json/to_bson/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::to_bson`](https://json.nlohmann.me/api/basic_json/to_bson/index.md): Throws `out_of_range.407` for integers that do not fit 64 bits since version 3.13.0 unreleased; previously, integers of a number type wider than 64 bits were silently truncated.
- [`basic_json::to_cbor`](https://json.nlohmann.me/api/basic_json/to_cbor/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::to_cbor`](https://json.nlohmann.me/api/basic_json/to_cbor/index.md): Throws `type_error.321` for a discarded value since version 3.13.0 unreleased; previously, a discarded value nested in an array or object was silently skipped, producing invalid CBOR.
- [`basic_json::to_cbor`](https://json.nlohmann.me/api/basic_json/to_cbor/index.md): Throws `out_of_range.407` for integers that do not fit 64 bits since version 3.13.0 unreleased; previously, integers of a number type wider than 64 bits were silently truncated.
- [`basic_json::to_msgpack`](https://json.nlohmann.me/api/basic_json/to_msgpack/index.md): Throws `out_of_range.412` and `out_of_range.415` since version 3.13.0 unreleased.
- [`basic_json::to_msgpack`](https://json.nlohmann.me/api/basic_json/to_msgpack/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::to_msgpack`](https://json.nlohmann.me/api/basic_json/to_msgpack/index.md): Fixed in version 3.13.0 unreleased to serialize `number_integer_t`/`number_unsigned_t` pairs of different width correctly; before, integers could be serialized with the wrong value if `number_integer_t` was narrower than `number_unsigned_t`.
- [`basic_json::to_msgpack`](https://json.nlohmann.me/api/basic_json/to_msgpack/index.md): Throws `type_error.321` for a discarded value since version 3.13.0 unreleased; previously, a discarded value nested in an array or object was silently skipped, producing invalid MessagePack.
- [`basic_json::to_msgpack`](https://json.nlohmann.me/api/basic_json/to_msgpack/index.md): Throws `out_of_range.407` for integers that do not fit 64 bits since version 3.13.0 unreleased; previously, integers of a number type wider than 64 bits were silently truncated.
- [`basic_json::to_ubjson`](https://json.nlohmann.me/api/basic_json/to_ubjson/index.md): Added `error_handler` parameter in version 3.13.0 unreleased.
- [`basic_json::to_ubjson`](https://json.nlohmann.me/api/basic_json/to_ubjson/index.md): Throws `type_error.321` for a discarded value since version 3.13.0 unreleased; previously, a discarded value nested in an array or object was silently skipped, producing invalid UBJSON.
- [`basic_json::type_name`](https://json.nlohmann.me/api/basic_json/type_name/index.md): Added `"invalid"` return value for corrupted JSON values in version 3.13.0 unreleased.
- [`basic_json::unflatten`](https://json.nlohmann.me/api/basic_json/unflatten/index.md): Made the array/object decision independent of the object's iteration order in version 3.13.0 unreleased.
- [`basic_json::unflatten`](https://json.nlohmann.me/api/basic_json/unflatten/index.md): Throws [`parse_error.109`](https://json.nlohmann.me/home/exceptions/#jsonexceptionparse_error109) instead of [`out_of_range.404`](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range404) for a one-character array index that is not a digit (e.g., `/x`) in version 3.13.0 unreleased, as it already did for longer ones.
- [`basic_json::update`](https://json.nlohmann.me/api/basic_json/update/index.md): Fixed use of freed or relocated memory when the argument is `*this` or refers to a value contained in `*this`, in version 3.13.0 unreleased.
- [`basic_json::value`](https://json.nlohmann.me/api/basic_json/value/index.md): Overload 1: Deleted overload for integral key types added in version 3.13.0 unreleased to reject such calls at compile time instead of causing undefined behavior at runtime.
- [`basic_json::value`](https://json.nlohmann.me/api/basic_json/value/index.md): Overload 2: Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
- [`basic_json::value`](https://json.nlohmann.me/api/basic_json/value/index.md): Overload 3: Extended to work with arrays in version 3.13.0 unreleased.
- [`basic_json::value`](https://json.nlohmann.me/api/basic_json/value/index.md): Overload 3: Throws [`parse_error.109`](https://json.nlohmann.me/home/exceptions/#jsonexceptionparse_error109) instead of returning `default_value` for a one-character array index that is not a digit (e.g., `/x`) in version 3.13.0 unreleased, as it already did for longer ones.
- [`JSON_HAS_CPP_11, JSON_HAS_CPP_14, JSON_HAS_CPP_17, JSON_HAS_CPP_20, JSON_HAS_CPP_23, JSON_HAS_CPP_26`](https://json.nlohmann.me/api/macros/json_has_cpp_11/index.md): Added `JSON_HAS_CPP_26` in version 3.13.0 unreleased.
- [`JSON_HAS_RANGES`](https://json.nlohmann.me/api/macros/json_has_ranges/index.md): Added the exclusions for libstdc++ < 11, Clang < 16 with libstdc++, libc++ < 16, and nvcc (CUDA) 12.0.x and 12.1.x in version 3.13.0 unreleased.
- [`JSON_USE_IMPLICIT_CONVERSIONS`](https://json.nlohmann.me/api/macros/json_use_implicit_conversions/index.md): Also affects the conversion between `basic_json` specializations with different string types since version 3.13.0 unreleased.
- [`JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON`](https://json.nlohmann.me/api/macros/json_use_legacy_discarded_value_comparison/index.md): Fixed in version 3.13.0 unreleased so `<=` and `>=` also emulate the legacy behavior in C++20 when the JSON value is the right-hand operand of a scalar comparison; before, only the 3-way-comparison-rewritten candidate was found, which yielded `false` instead of `true`.