This commit is contained in:
nlohmann committed 2026-11-15 18:44:48 +00:00
1 parent 9f62284716
commit 70feeb496c
447 files changed
+1643 -876

No files matched your search

+4 -1
View File
@@ -73,7 +73,7 @@ Strong guarantee: if an exception is thrown, there are no changes in the JSON va
- Throws [parse_error.113](https://json.nlohmann.me/home/exceptions/#jsonexceptionparse_error113) if a string could not be parsed successfully (negative or non-integer length, `C` followed by a byte above 0x7F), if the count of an optimized container is negative, or if a string value or object key is not valid UTF-8 and `error_handler` is `strict`
- Throws [parse_error.115](https://json.nlohmann.me/home/exceptions/#jsonexceptionparse_error115) if the text of a high-precision number (`H`) is not a valid JSON number
- Throws [out_of_range.406](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range406) if a high-precision number, or a float64 when `number_float_t` is `float`, does not fit into `number_float_t`
- Throws [out_of_range.408](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range408) if the count of an optimized container exceeds the capacity of the container (or of `std::size_t`), or if an optimized array of `Z`, `T`, or `F` has more than 1,048,576 elements
- Throws [out_of_range.408](https://json.nlohmann.me/home/exceptions/#jsonexceptionout_of_range408) if the count of an optimized container exceeds the capacity of the container (or of `std::size_t`; an array of type `N` is empty, so only the latter applies to it), if an optimized array of `Z`, `T`, or `F` has more than 1,048,576 elements, or if the optimized arrays of `Z`, `T`, and `F` in the input together have more than 1,048,576 elements plus [`JSON_UBJSON_VALUELESS_ELEMENTS_PER_BYTE`](https://json.nlohmann.me/api/macros/json_ubjson_valueless_elements_per_byte/index.md) (4 by default) for every byte read so far
## Complexity
@@ -124,6 +124,7 @@ Output:
- [Parsing untrusted input](https://json.nlohmann.me/features/parsing/untrusted_input/index.md) - limits and safe handling of hostile data
- [Binary values](https://json.nlohmann.me/features/binary_values/index.md) - how binary values and subtypes are handled
- [`to_ubjson`](https://json.nlohmann.me/api/basic_json/to_ubjson/index.md) - create a UBJSON serialization of a JSON value
- [`JSON_UBJSON_VALUELESS_ELEMENTS_PER_BYTE`](https://json.nlohmann.me/api/macros/json_ubjson_valueless_elements_per_byte/index.md) - set how many elements of arrays of `null`, `true`, or `false` the input may announce per byte
- [`from_cbor`](https://json.nlohmann.me/api/basic_json/from_cbor/index.md) - create a JSON value from an input in CBOR format
- [`from_msgpack`](https://json.nlohmann.me/api/basic_json/from_msgpack/index.md) - create a JSON value from an input in MessagePack format
- [`from_bson`](https://json.nlohmann.me/api/basic_json/from_bson/index.md) - create a JSON value from an input in BSON format
@@ -137,6 +138,8 @@ Output:
- 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.
- Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0 unreleased.
- Added `error_handler` parameter in version 3.13.0 unreleased.
- Report `start_array(0)` to a SAX handler for an optimized array of type `N` (`[$N#n`), whatever its count, in version 3.13.0.
- Limited the total number of elements of optimized arrays of `Z`, `T`, and `F` in one input in version 3.13.0 unreleased; the number of elements per byte can be set with [`JSON_UBJSON_VALUELESS_ELEMENTS_PER_BYTE`](https://json.nlohmann.me/api/macros/json_ubjson_valueless_elements_per_byte/index.md), for example to read files written by version 3.12.0 and earlier that exceed the default.
Deprecation