This commit is contained in:
nlohmann
2026-10-24 17:31:11 +00:00
parent 7130ea885a
commit 39c2507b2a
629 changed files with 3665 additions and 1648 deletions
+2 -2
View File
@@ -92,7 +92,7 @@ Conda, and more), and pkg-config.
What changed in each release, with links to the relevant documentation.
[:octicons-arrow-right-24: Releases](home/releases.md)
[:octicons-arrow-right-24: Releases](home/releases/index.md)
- :octicons-people-24:{ .lg .middle } __Community__
@@ -108,7 +108,7 @@ Conda, and more), and pkg-config.
This documentation is built from the `develop` branch and may describe changes that are not part of a release
yet. Their version numbers are followed by an <span class="unreleased-version">unreleased</span> badge; see
[Releases](home/releases.md) for what shipped in each version.
[Releases](home/releases/index.md) for what shipped in each version.
The library is licensed under the [MIT License](home/license.md). The source code, issue tracker, and discussions
are on [GitHub](https://github.com/nlohmann/json).
+1 -1
View File
File diff suppressed because one or more lines are too long
+8
View File
@@ -30,6 +30,14 @@ struct adl_serializer {
- [**from_json**](from_json.md) - convert a JSON value to any value type
- [**to_json**](to_json.md) - convert any value type to a JSON value
## See also
- [Arbitrary type conversions](../../features/arbitrary_types.md) - how to make your types convertible
- [**get**](../basic_json/get.md) / [**get_to**](../basic_json/get_to.md) - convert a JSON value to a C++ type
- [**basic_json**](../basic_json/basic_json.md) - construct a JSON value from a C++ value
- [**NLOHMANN_DEFINE_TYPE_INTRUSIVE**](../macros/nlohmann_define_type_intrusive.md) - generate the conversion functions for a type
- [Specializing enum conversion](../../features/enum_conversion.md)
## Version history
- Added in version 2.1.0.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+8
View File
@@ -29,6 +29,14 @@ struct adl_serializer {
- [**from_json**](https://json.nlohmann.me/api/adl_serializer/from_json/index.md) - convert a JSON value to any value type
- [**to_json**](https://json.nlohmann.me/api/adl_serializer/to_json/index.md) - convert any value type to a JSON value
## See also
- [Arbitrary type conversions](https://json.nlohmann.me/features/arbitrary_types/index.md) - how to make your types convertible
- [**get**](https://json.nlohmann.me/api/basic_json/get/index.md) / [**get_to**](https://json.nlohmann.me/api/basic_json/get_to/index.md) - convert a JSON value to a C++ type
- [**basic_json**](https://json.nlohmann.me/api/basic_json/basic_json/index.md) - construct a JSON value from a C++ value
- [**NLOHMANN_DEFINE_TYPE_INTRUSIVE**](https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/index.md) - generate the conversion functions for a type
- [Specializing enum conversion](https://json.nlohmann.me/features/enum_conversion/index.md)
## Version history
- Added in version 2.1.0.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -3
View File
@@ -722,9 +722,8 @@ Strong exception safety: if an exception occurs, the original value stays intact
1. Added in version 1.0.0.
2. Added in version 1.0.0.
3. Added in version 3.11.0. Fixed in version 3.13.0 to consistently accept `std::string_view`-convertible keys, as
already supported by [`operator[]`](operator[].md), [`value`](value.md), [`find`](find.md), and other lookup
functions.
3. Added in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0, consistently
across the lookup functions.
4. Added in version 2.0.0. Throws [`parse_error.109`](../../home/exceptions.md#jsonexceptionparse_error109) instead of
[`out_of_range.404`](../../home/exceptions.md#jsonexceptionout_of_range404) for a one-character array index that is not
a digit (e.g., `/x`) in version 3.13.0, as it already did for longer ones.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -675,5 +675,5 @@ Output:
1. Added in version 1.0.0.
1. Added in version 1.0.0.
1. Added in version 3.11.0. Fixed in version 3.13.0 unreleased to consistently accept `std::string_view`-convertible keys, as already supported by [`operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md), [`value`](https://json.nlohmann.me/api/basic_json/value/index.md), [`find`](https://json.nlohmann.me/api/basic_json/find/index.md), and other lookup functions.
1. Added in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
1. Added in version 2.0.0. 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.
+1 -1
View File
@@ -108,4 +108,4 @@ Constant.
## Version history
- Added in version 1.0.0.
- Adjusted code to return reference to binary values in version 3.8.0.
- Binary values are supported since version 3.8.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -103,4 +103,4 @@ true
## Version history
- Added in version 1.0.0.
- Adjusted code to return reference to binary values in version 3.8.0.
- Binary values are supported since version 3.8.0.
+9 -9
View File
@@ -931,15 +931,15 @@ basic_json(basic_json&& other) noexcept;
## Version history
1. Since version 1.0.0.
2. Since version 1.0.0.
3. Since version 2.1.0.
4. Since version 3.2.0. Explicit for different string types if `JSON_USE_IMPLICIT_CONVERSIONS` is `0` since
1. Added in version 1.0.0.
2. Added in version 1.0.0.
3. Added in version 2.1.0.
4. Added in version 3.1.2. Explicit for different string types if `JSON_USE_IMPLICIT_CONVERSIONS` is `0` since
version 3.13.0.
5. Since version 1.0.0.
6. Since version 1.0.0.
7. Since version 1.0.0. Fixed in version 3.13.0 to also check the iterator range for binary values; before, a range
5. Added in version 1.0.0.
6. Added in version 1.0.0.
7. Added in version 1.0.0. Fixed in version 3.13.0 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.
8. Since version 1.0.0.
9. Since version 1.0.0.
8. Added in version 1.0.0.
9. Added in version 1.0.0.
File diff suppressed because one or more lines are too long
+9 -9
View File
@@ -832,12 +832,12 @@ null
## Version history
1. Since version 1.0.0.
1. Since version 1.0.0.
1. Since version 2.1.0.
1. Since version 3.2.0. Explicit for different string types if `JSON_USE_IMPLICIT_CONVERSIONS` is `0` since version 3.13.0 unreleased.
1. Since version 1.0.0.
1. Since version 1.0.0.
1. Since version 1.0.0. 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.
1. Since version 1.0.0.
1. Since version 1.0.0.
1. Added in version 1.0.0.
1. Added in version 1.0.0.
1. Added in version 2.1.0.
1. Added in version 3.1.2. Explicit for different string types if `JSON_USE_IMPLICIT_CONVERSIONS` is `0` since version 3.13.0 unreleased.
1. Added in version 1.0.0.
1. Added in version 1.0.0.
1. Added in version 1.0.0. 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.
1. Added in version 1.0.0.
1. Added in version 1.0.0.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -3
View File
@@ -221,9 +221,8 @@ Logarithmic in the size of the JSON object.
## Version history
1. Added in version 3.11.0.
2. Added in version 3.6.0. Extended template `KeyType` to support comparable types in version 3.11.0. Fixed in
version 3.13.0 to consistently accept `std::string_view`-convertible keys, as already supported by
[`operator[]`](operator[].md), [`at`](at.md), [`value`](value.md), and other lookup functions.
2. Added in version 3.6.0. Extended template `KeyType` to support comparable types in version 3.11.0. Support for keys
convertible to `std::string_view` added in version 3.13.0, consistently across the lookup functions.
3. Added in version 3.7.0.
4. Deleted overloads for integral key types added in version 3.13.0 to reject such calls at compile time instead of
causing undefined behavior at runtime.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -198,6 +198,6 @@ false
## Version history
1. Added in version 3.11.0.
1. Added in version 3.6.0. Extended template `KeyType` to support comparable types in version 3.11.0. Fixed in version 3.13.0 unreleased to consistently accept `std::string_view`-convertible keys, as already supported by [`operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md), [`at`](https://json.nlohmann.me/api/basic_json/at/index.md), [`value`](https://json.nlohmann.me/api/basic_json/value/index.md), and other lookup functions.
1. Added in version 3.6.0. Extended template `KeyType` to support comparable types in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
1. Added in version 3.7.0.
1. 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.
+2 -3
View File
@@ -134,8 +134,7 @@ Logarithmic in the size of the JSON object.
## Version history
1. Added in version 3.11.0.
2. Added in version 1.0.0. Changed parameter `key` type to `KeyType&&` in version 3.11.0. Fixed in version 3.13.0 to
consistently accept `std::string_view`-convertible keys, as already supported by [`operator[]`](operator[].md),
[`at`](at.md), [`value`](value.md), and other lookup functions.
2. Added in version 1.0.0. Changed to support comparable key types in version 3.11.0. Support for keys convertible to
`std::string_view` added in version 3.13.0, consistently across the lookup functions.
3. Deleted overload for integral key types added in version 3.13.0 to reject such calls at compile time instead of
causing undefined behavior at runtime.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -119,5 +119,5 @@ number of elements with key "three": 0
## Version history
1. Added in version 3.11.0.
1. Added in version 1.0.0. Changed parameter `key` type to `KeyType&&` in version 3.11.0. Fixed in version 3.13.0 unreleased to consistently accept `std::string_view`-convertible keys, as already supported by [`operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md), [`at`](https://json.nlohmann.me/api/basic_json/at/index.md), [`value`](https://json.nlohmann.me/api/basic_json/value/index.md), and other lookup functions.
1. Added in version 1.0.0. Changed to support comparable key types in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
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.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -106,6 +106,6 @@ Logarithmic in the size of the container, O(log(`size()`)).
## Version history
- Since version 2.0.8.
- Added in version 2.0.8.
- Fixed in version 3.13.0: for [`ordered_json`](../ordered_json.md), the value could previously only be passed as an
rvalue; it can now also be passed as an lvalue or a `#!cpp const` lvalue, matching the behavior of `json`.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -94,5 +94,5 @@ null
## Version history
- Since version 2.0.8.
- Added in version 2.0.8.
- 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`.
+1 -1
View File
@@ -95,5 +95,5 @@ Amortized constant.
## Version history
- Since version 2.0.8.
- Added in version 2.0.8.
- Returns reference since 3.7.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -85,5 +85,5 @@ null
## Version history
- Since version 2.0.8.
- Added in version 2.0.8.
- Returns reference since 3.7.0.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -3
View File
@@ -346,7 +346,6 @@ Strong exception safety: if an exception occurs, the original value stays intact
1. Added in version 1.0.0. Added support for binary types in version 3.8.0.
2. Added in version 1.0.0. Added support for binary types in version 3.8.0.
3. Added in version 1.0.0.
4. Added in version 3.11.0. Fixed in version 3.13.0 to consistently accept `std::string_view`-convertible keys, as
already supported by [`operator[]`](operator[].md), [`at`](at.md), [`value`](value.md), and other lookup
functions.
4. Added in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0, consistently
across the lookup functions.
5. Added in version 1.0.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -309,5 +309,5 @@ Output:
1. Added in version 1.0.0. Added support for binary types in version 3.8.0.
1. Added in version 1.0.0. Added support for binary types in version 3.8.0.
1. Added in version 1.0.0.
1. Added in version 3.11.0. Fixed in version 3.13.0 unreleased to consistently accept `std::string_view`-convertible keys, as already supported by [`operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md), [`at`](https://json.nlohmann.me/api/basic_json/at/index.md), [`value`](https://json.nlohmann.me/api/basic_json/value/index.md), and other lookup functions.
1. Added in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
1. Added in version 1.0.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -106,4 +106,4 @@ constructor.
## Version history
- Since version 3.0.0.
- Added in version 3.0.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -100,4 +100,4 @@ exception id: 403
## Version history
- Since version 3.0.0.
- Added in version 3.0.0.
+2 -3
View File
@@ -147,8 +147,7 @@ Logarithmic in the size of the JSON object.
## Version history
1. Added in version 3.11.0.
2. Added in version 1.0.0. Changed to support comparable types in version 3.11.0. Fixed in version 3.13.0 to
consistently accept `std::string_view`-convertible keys, as already supported by [`operator[]`](operator[].md),
[`at`](at.md), [`value`](value.md), and other lookup functions.
2. Added in version 1.0.0. Changed to support comparable types in version 3.11.0. Support for keys convertible to
`std::string_view` added in version 3.13.0, consistently across the lookup functions.
3. Deleted overloads for integral key types added in version 3.13.0 to reject such calls at compile time instead of
causing undefined behavior at runtime.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -130,5 +130,5 @@ value at key "two": 2
## Version history
1. Added in version 3.11.0.
1. Added in version 1.0.0. Changed to support comparable types in version 3.11.0. Fixed in version 3.13.0 unreleased to consistently accept `std::string_view`-convertible keys, as already supported by [`operator[]`](https://json.nlohmann.me/api/basic_json/operator%5B%5D/index.md), [`at`](https://json.nlohmann.me/api/basic_json/at/index.md), [`value`](https://json.nlohmann.me/api/basic_json/value/index.md), and other lookup functions.
1. Added in version 1.0.0. Changed to support comparable types in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0 unreleased, consistently across the lookup functions.
1. 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.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -92,4 +92,4 @@ Constant.
## Version history
- Added in version 1.0.0.
- Adjusted code to return reference to binary values in version 3.8.0.
- Binary values are supported since version 3.8.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -86,4 +86,4 @@ true
## Version history
- Added in version 1.0.0.
- Adjusted code to return reference to binary values in version 3.8.0.
- Binary values are supported since version 3.8.0.
+3 -3
View File
@@ -291,6 +291,6 @@ overload (3).
## Version history
1. Since version 2.1.0.
2. Since version 2.1.0. Extended to work with other specializations of `basic_json` in version 3.2.0.
3. Since version 1.0.0.
1. Added in version 2.1.0.
2. Added in version 2.1.0. Extended to work with other specializations of `basic_json` in version 3.1.2.
3. Added in version 1.0.0.
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -254,6 +254,6 @@ true
## Version history
1. Since version 2.1.0.
1. Since version 2.1.0. Extended to work with other specializations of `basic_json` in version 3.2.0.
1. Since version 1.0.0.
1. Added in version 2.1.0.
1. Added in version 2.1.0. Extended to work with other specializations of `basic_json` in version 3.1.2.
1. Added in version 1.0.0.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -146,5 +146,5 @@ Depends on the `json_serializer<ValueType>::from_json()` implementation.
## Version history
- Since version 3.3.0.
- Added in version 3.3.0.
- Added a `static_assert` with a clear message for `const` arguments in version 3.13.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -137,5 +137,5 @@ string: "Hello, world!"
## Version history
- Since version 3.3.0.
- Added in version 3.3.0.
- Added a `static_assert` with a clear message for `const` arguments in version 3.13.0 unreleased.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -98,4 +98,4 @@ classDiagram
## Version history
- Since version 3.0.0.
- Added in version 3.0.0.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -96,4 +96,4 @@ exception id: 207
## Version history
- Since version 3.0.0.
- Added in version 3.0.0.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -134,8 +134,8 @@ When iterating over an array, `key()` will return the index of the element as st
## Version history
- Added `iterator_wrapper` in version 3.0.0.
- Added `items` and deprecated `iterator_wrapper` in version 3.1.0.
- Added in version 3.1.0 as the replacement of the static function `iterator_wrapper`, which was available since
version 1.0.0 and is deprecated since version 3.1.0.
- Added structured binding support in version 3.5.0.
!!! warning "Deprecation"
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More