This commit is contained in:
nlohmann committed 2026-11-12 11:46:38 +00:00
1 parent 8ddeea7128
commit 5097c20962
516 files changed
+7306 -5984

No files matched your search

+1 -1
View File
@@ -1 +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=description content="JSON for Modern C++ is a header-only C++11 library that makes JSON a first-class data type."><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.8.0"><title>Unreleased - JSON for Modern C++</title><link rel=stylesheet href=../../../assets/stylesheets/main.57a0d79d.min.css><link rel=stylesheet href=../../../assets/stylesheets/palette.fb2fffe2.min.css><link rel=stylesheet href=../../../css/custom.css><link rel=stylesheet href=../../../css/brand.css><link rel=stylesheet href=../../../css/fig-sax.css><link rel=stylesheet href=../../../css/fig-jsonview.css><link rel=stylesheet href=../../../css/fig-exceptions.css><link rel=stylesheet href=../../../css/fig-pointer.css><link rel=stylesheet href=../../../css/fig-charts.css><link rel=stylesheet href=../../../css/fig-integration.css><link rel=stylesheet href=../../../css/fig-macros.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=custom data-md-color-accent=custom> <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> <img src=../../../images/wordmark-header.svg alt=logo> </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=custom data-md-color-accent=custom 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=custom data-md-color-accent=custom 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-.5Line truncated
<!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=description content="JSON for Modern C++ is a header-only C++11 library that makes JSON a first-class data type."><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.8.0"><title>Unreleased - JSON for Modern C++</title><link rel=stylesheet href=../../../assets/stylesheets/main.57a0d79d.min.css><link rel=stylesheet href=../../../assets/stylesheets/palette.fb2fffe2.min.css><link rel=stylesheet href=../../../css/custom.css><link rel=stylesheet href=../../../css/brand.css><link rel=stylesheet href=../../../css/fig-sax.css><link rel=stylesheet href=../../../css/fig-jsonview.css><link rel=stylesheet href=../../../css/fig-exceptions.css><link rel=stylesheet href=../../../css/fig-pointer.css><link rel=stylesheet href=../../../css/fig-charts.css><link rel=stylesheet href=../../../css/fig-integration.css><link rel=stylesheet href=../../../css/fig-macros.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=custom data-md-color-accent=custom> <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> <img src=../../../images/wordmark-header.svg alt=logo> </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=custom data-md-color-accent=custom 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=custom data-md-color-accent=custom 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-.5Line truncated
+6 -2
View File
@@ -3,16 +3,17 @@
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).
- In C++20 (library support for `char8_t`, `__cpp_lib_char8_t`), a `std::u8string` is a JSON **string**: `json j = std::u8string(u8"abc");` stores `"abc"`, and `j.get<std::u8string>()` reads it back. Version 3.12.0 stored a `std::u8string` as an array of code units (`[97,98,99]`); on the 3.13.0 development branch it was already stored as a string if `std::filesystem` is available, but could not be read back. Now the result no longer depends on whether `std::filesystem::path` is supported, and `get<std::u8string>()` accepts both a JSON string and the array of numbers written by 3.12.0. **Consequence:** JSON documents produced from a `std::u8string` by 3.12.0 (arrays) are still read, but code that checks `is_array()` on such a value, or that reads it as `std::vector<char8_t>` / `std::vector<std::uint8_t>`, now sees a string; to keep the array form, convert explicitly, e.g., `json(std::vector<char8_t>(s.begin(), s.end()))`. `std::u8string_view` and `char8_t` arrays are unchanged (arrays of code units). See [`basic_json`](https://json.nlohmann.me/api/basic_json/basic_json/index.md).
## API changes
**Added (88 pages):**
**Added (89 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), [`nlohmann_define_type_with_names`](https://json.nlohmann.me/api/macros/nlohmann_define_type_with_names/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_RECURSION_DEPTH_LIMIT`](https://json.nlohmann.me/api/macros/json_recursion_depth_limit/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), [`nlohmann_define_type_with_names`](https://json.nlohmann.me/api/macros/nlohmann_define_type_with_names/index.md)
**Changed:**
@@ -85,6 +86,7 @@ These changes are part of the `develop` branch, but not of a release yet.
- [`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): Fixed the position that a [`parse_error.101`](https://json.nlohmann.me/home/exceptions/#jsonexceptionparse_error101) reports for an unexpected number that is followed by a line feed in version 3.13.0 unreleased: for the input `1`, line feed, `2`, line feed, version 3.12.0 reported "line 2, column 0" and version 3.13.0 unreleased reports "line 2, column 1"; for `1 2` and a line feed, the report was "line 1, column 0" and is now "line 1, column 3".
- [`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::parse`](https://json.nlohmann.me/api/basic_json/parse/index.md): Ill-formed UTF-16 and UTF-32 input (a lone surrogate, a high surrogate that is not followed by its low surrogate, or a code point above `U+10FFFF`) is rejected with `parse_error.101` in version 3.13.0 unreleased; before that, some such sequences were accepted or ended the input silently.
@@ -109,6 +111,7 @@ These changes are part of the `develop` branch, but not of a release yet.
- [`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)).
- [`basic_json::sax_parse`](https://json.nlohmann.me/api/basic_json/sax_parse/index.md): Ill-formed UTF-16 and UTF-32 input (a lone surrogate, a high surrogate that is not followed by its low surrogate, or a code point above `U+10FFFF`) is rejected with `parse_error.101` in version 3.13.0 unreleased; before that, some such sequences were accepted or ended the input silently.
- [`basic_json::start_pos`](https://json.nlohmann.me/api/basic_json/start_pos/index.md): Fixed in version 3.13.0 unreleased: in version 3.12.0, the start position of a string that contains escape sequences (for example `"\n"` or `"\u00e4"`) was too large, by the number of bytes the escape sequences add to the source text.
- [`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.
@@ -140,6 +143,7 @@ These changes are part of the `develop` branch, but not of a release yet.
- [`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_pointer::operator/=`](https://json.nlohmann.me/api/json_pointer/operator_slasheq/index.md): Overload 1: Appending a JSON pointer to itself no longer results in undefined behavior in version 3.13.0 unreleased.
- [`JSON_DIAGNOSTIC_POSITIONS`](https://json.nlohmann.me/api/macros/json_diagnostic_positions/index.md): Fixed in version 3.13.0 unreleased: in version 3.12.0, [`start_pos()`](https://json.nlohmann.me/api/basic_json/start_pos/index.md) of a string that contains escape sequences was too large; it is now the position of the opening `"`.
- [`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.