diff --git a/docs/mkdocs/docs/api/adl_serializer/from_json.md b/docs/mkdocs/docs/api/adl_serializer/from_json.md
index 2f49e4b80..72df961f4 100644
--- a/docs/mkdocs/docs/api/adl_serializer/from_json.md
+++ b/docs/mkdocs/docs/api/adl_serializer/from_json.md
@@ -30,7 +30,8 @@ class (either explicitly or via the conversion operators).
## Return value
-Copy of the JSON value, converted to `ValueType`
+1. (none) -- the converted value is written to the output parameter `val`.
+2. the JSON value `j` converted to `TargetType`
## Examples
diff --git a/docs/mkdocs/docs/api/basic_json/accept.md b/docs/mkdocs/docs/api/basic_json/accept.md
index 5f9bac053..9e495cdef 100644
--- a/docs/mkdocs/docs/api/basic_json/accept.md
+++ b/docs/mkdocs/docs/api/basic_json/accept.md
@@ -101,6 +101,7 @@ A UTF-8 byte order mark is silently ignored.
## See also
- [parse](parse.md) - deserialize from a compatible input
+- [sax_parse](sax_parse.md) - parse input using the SAX interface
- [operator>>](../operator_gtgt.md) - deserialize from stream
## Version history
@@ -108,7 +109,7 @@ A UTF-8 byte order mark is silently ignored.
- Added in version 3.0.0.
- Ignoring comments via `ignore_comments` added in version 3.9.0.
- Changed [runtime assertion](../../features/assertions.md) in case of `FILE*` null pointers to exception in version 3.12.0.
-- Added `ignore_trailing_commas` in version 3.12.1.
+- Added `ignore_trailing_commas` in version 3.12.x.
!!! warning "Deprecation"
diff --git a/docs/mkdocs/docs/api/basic_json/at.md b/docs/mkdocs/docs/api/basic_json/at.md
index 800b46eb3..2d1042cc8 100644
--- a/docs/mkdocs/docs/api/basic_json/at.md
+++ b/docs/mkdocs/docs/api/basic_json/at.md
@@ -82,6 +82,8 @@ Strong exception safety: if an exception occurs, the original value stays intact
key of an object which cannot be found. See the example below.
- Throws [`out_of_range.404`](../../home/exceptions.md#jsonexceptionout_of_range404) if the JSON pointer `ptr` can
not be resolved. See the example below.
+ - Throws [`out_of_range.410`](../../home/exceptions.md#jsonexceptionout_of_range410) if an array index in the passed
+ JSON pointer `ptr` exceeds the range of `size_type` (e.g., on 32-bit platforms).
## Complexity
diff --git a/docs/mkdocs/docs/api/basic_json/boolean_t.md b/docs/mkdocs/docs/api/basic_json/boolean_t.md
index e3a783027..c30afefdc 100644
--- a/docs/mkdocs/docs/api/basic_json/boolean_t.md
+++ b/docs/mkdocs/docs/api/basic_json/boolean_t.md
@@ -9,7 +9,7 @@ The type used to store JSON booleans.
[RFC 8259](https://tools.ietf.org/html/rfc8259) implicitly describes a boolean as a type which differentiates the two
literals `#!json true` and `#!json false`.
-To store objects in C++, a type is defined by the template parameter `BooleanType` which chooses the type to use.
+To store boolean values in C++, a type is defined by the template parameter `BooleanType` which chooses the type to use.
## Notes
diff --git a/docs/mkdocs/docs/api/basic_json/contains.md b/docs/mkdocs/docs/api/basic_json/contains.md
index 41c376e57..7f865f83c 100644
--- a/docs/mkdocs/docs/api/basic_json/contains.md
+++ b/docs/mkdocs/docs/api/basic_json/contains.md
@@ -48,11 +48,7 @@ Strong exception safety: if an exception occurs, the original value stays intact
1. The function does not throw exceptions.
2. The function does not throw exceptions.
-3. The function can throw the following exceptions:
- - Throws [`parse_error.106`](../../home/exceptions.md#jsonexceptionparse_error106) if an array index begins with
- `0`.
- - Throws [`parse_error.109`](../../home/exceptions.md#jsonexceptionparse_error109) if an array index was not a
- number.
+3. The function does not throw exceptions.
## Complexity
@@ -111,6 +107,11 @@ Logarithmic in the size of the JSON object.
--8<-- "examples/contains__json_pointer.output"
```
+## See also
+
+- [find](find.md) find a value in an object
+- [count](count.md) returns the number of occurrences of a key
+
## Version history
1. Added in version 3.11.0.
diff --git a/docs/mkdocs/docs/api/basic_json/count.md b/docs/mkdocs/docs/api/basic_json/count.md
index 4f3a31055..ce51addbd 100644
--- a/docs/mkdocs/docs/api/basic_json/count.md
+++ b/docs/mkdocs/docs/api/basic_json/count.md
@@ -72,6 +72,11 @@ This method always returns `0` when executed on a JSON type that is not an objec
--8<-- "examples/count__keytype.c++17.output"
```
+## See also
+
+- [find](find.md) find a value in an object
+- [contains](contains.md) checks whether a key exists
+
## Version history
1. Added in version 3.11.0.
diff --git a/docs/mkdocs/docs/api/basic_json/crbegin.md b/docs/mkdocs/docs/api/basic_json/crbegin.md
index 7af5ecae4..95680fb3a 100644
--- a/docs/mkdocs/docs/api/basic_json/crbegin.md
+++ b/docs/mkdocs/docs/api/basic_json/crbegin.md
@@ -10,7 +10,7 @@ Returns an iterator to the reverse-beginning; that is, the last element.
## Return value
-reverse iterator to the first element
+reverse iterator to the last element
## Exception safety
diff --git a/docs/mkdocs/docs/api/basic_json/crend.md b/docs/mkdocs/docs/api/basic_json/crend.md
index 0e6bc8474..19c581dfe 100644
--- a/docs/mkdocs/docs/api/basic_json/crend.md
+++ b/docs/mkdocs/docs/api/basic_json/crend.md
@@ -25,7 +25,7 @@ Constant.
??? example
- The following code shows an example for `eend()`.
+ The following code shows an example for `crend()`.
```cpp
--8<-- "examples/crend.cpp"
diff --git a/docs/mkdocs/docs/api/basic_json/diff.md b/docs/mkdocs/docs/api/basic_json/diff.md
index 4e840684e..fb6683ec8 100644
--- a/docs/mkdocs/docs/api/basic_json/diff.md
+++ b/docs/mkdocs/docs/api/basic_json/diff.md
@@ -56,6 +56,9 @@ Currently, only `remove`, `add`, and `replace` operations are generated.
## See also
- [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
+- [patch](patch.md) applies a JSON Patch
+- [patch_inplace](patch_inplace.md) applies a JSON Patch in place
+- [merge_patch](merge_patch.md) applies a JSON Merge Patch
## Version history
diff --git a/docs/mkdocs/docs/api/basic_json/dump.md b/docs/mkdocs/docs/api/basic_json/dump.md
index 21e22a48c..e92c2d5a0 100644
--- a/docs/mkdocs/docs/api/basic_json/dump.md
+++ b/docs/mkdocs/docs/api/basic_json/dump.md
@@ -26,7 +26,7 @@ and `ensure_ascii` parameters.
`error_handler` (in)
: how to react on decoding errors; there are three possible values (see [`error_handler_t`](error_handler_t.md):
- `strict` (throws and exception in case a decoding error occurs; default), `replace` (replace invalid UTF-8 sequences
+ `strict` (throws an exception in case a decoding error occurs; default), `replace` (replace invalid UTF-8 sequences
with U+FFFD), and `ignore` (ignore invalid UTF-8 sequences during serialization; all bytes are copied to the output
unchanged)).
@@ -71,6 +71,11 @@ Binary values are serialized as an object containing two keys:
--8<-- "examples/dump.output"
```
+## See also
+
+- [to_string](to_string.md) returns a string representation of a JSON value
+- [operator<<](../operator_ltlt.md) serialize to stream
+
## Version history
- Added in version 1.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/emplace.md b/docs/mkdocs/docs/api/basic_json/emplace.md
index cf637d628..ffcb80184 100644
--- a/docs/mkdocs/docs/api/basic_json/emplace.md
+++ b/docs/mkdocs/docs/api/basic_json/emplace.md
@@ -29,6 +29,10 @@ iterators (including the `end()` iterator) and all references to the elements ar
a pair consisting of an iterator to the inserted element, or the already-existing element if no insertion happened, and
a `#!cpp bool` denoting whether the insertion took place.
+## Exception safety
+
+Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
+
## Exceptions
Throws [`type_error.311`](../../home/exceptions.md#jsonexceptiontype_error311) when called on a type other than JSON
@@ -56,6 +60,11 @@ Logarithmic in the size of the container, O(log(`size()`)).
--8<-- "examples/emplace.output"
```
+## See also
+
+- [emplace_back](emplace_back.md) add a value to an array
+- [insert](insert.md) add values to an array/object
+
## Version history
- Since version 2.0.8.
diff --git a/docs/mkdocs/docs/api/basic_json/erase.md b/docs/mkdocs/docs/api/basic_json/erase.md
index 1187995b6..68f48e26c 100644
--- a/docs/mkdocs/docs/api/basic_json/erase.md
+++ b/docs/mkdocs/docs/api/basic_json/erase.md
@@ -101,7 +101,7 @@ Strong exception safety: if an exception occurs, the original value stays intact
4. See 3.
5. The function can throw the following exceptions:
- Throws [`type_error.307`](../../home/exceptions.md#jsonexceptiontype_error307) when called on a type other than
- JSON object; example: `"cannot use erase() with null"`
+ JSON array; example: `"cannot use erase() with null"`
- Throws [`out_of_range.401`](../../home/exceptions.md#jsonexceptionout_of_range401) when `idx >= size()`; example:
`"array index 17 is out of range"`
@@ -202,6 +202,11 @@ Strong exception safety: if an exception occurs, the original value stays intact
--8<-- "examples/erase__size_type.output"
```
+## See also
+
+- [clear](clear.md) clears the contents
+- [insert](insert.md) add values to an array/object
+
## Version history
1. Added in version 1.0.0. Added support for binary types in version 3.8.0.
diff --git a/docs/mkdocs/docs/api/basic_json/find.md b/docs/mkdocs/docs/api/basic_json/find.md
index c64350718..35ff9dcb2 100644
--- a/docs/mkdocs/docs/api/basic_json/find.md
+++ b/docs/mkdocs/docs/api/basic_json/find.md
@@ -78,6 +78,7 @@ This method always returns `end()` when executed on a JSON type that is not an o
## See also
+- [count](count.md) returns the number of occurrences of a key
- [contains](contains.md) checks whether a key exists
## Version history
diff --git a/docs/mkdocs/docs/api/basic_json/from_bjdata.md b/docs/mkdocs/docs/api/basic_json/from_bjdata.md
index cef13aea5..274444aab 100644
--- a/docs/mkdocs/docs/api/basic_json/from_bjdata.md
+++ b/docs/mkdocs/docs/api/basic_json/from_bjdata.md
@@ -67,6 +67,8 @@ Strong guarantee: if an exception is thrown, there are no changes in the JSON va
- Throws [parse_error.112](../../home/exceptions.md#jsonexceptionparse_error112) if a parse error occurs
- Throws [parse_error.113](../../home/exceptions.md#jsonexceptionparse_error113) if a string could not be parsed
successfully
+- Throws [out_of_range.408](../../home/exceptions.md#jsonexceptionout_of_range408) if the size of an optimized container
+ or n-dimensional array cannot be represented by `std::size_t`
## Complexity
@@ -88,6 +90,14 @@ Linear in the size of the input.
--8<-- "examples/from_bjdata.output"
```
+## See also
+
+- [to_bjdata](to_bjdata.md) create a BJData serialization of a JSON value
+- [from_cbor](from_cbor.md) create a JSON value from an input in CBOR format
+- [from_msgpack](from_msgpack.md) create a JSON value from an input in MessagePack format
+- [from_bson](from_bson.md) create a JSON value from an input in BSON format
+- [from_ubjson](from_ubjson.md) create a JSON value from an input in UBJSON format
+
## Version history
- Added in version 3.11.0.
diff --git a/docs/mkdocs/docs/api/basic_json/from_bson.md b/docs/mkdocs/docs/api/basic_json/from_bson.md
index fd7d0b097..41389c151 100644
--- a/docs/mkdocs/docs/api/basic_json/from_bson.md
+++ b/docs/mkdocs/docs/api/basic_json/from_bson.md
@@ -62,8 +62,12 @@ Strong guarantee: if an exception is thrown, there are no changes in the JSON va
## Exceptions
-Throws [`parse_error.114`](../../home/exceptions.md#jsonexceptionparse_error114) if an unsupported BSON record type is
-encountered.
+- Throws [`parse_error.110`](../../home/exceptions.md#jsonexceptionparse_error110) if the given input ends prematurely or
+ the end of the input was not reached when `strict` was set to true
+- Throws [`parse_error.112`](../../home/exceptions.md#jsonexceptionparse_error112) if a parse error occurs (e.g., an
+ invalid string or byte array length)
+- Throws [`parse_error.114`](../../home/exceptions.md#jsonexceptionparse_error114) if an unsupported BSON record type is
+ encountered
## Complexity
@@ -92,6 +96,7 @@ Linear in the size of the input.
- [from_cbor](from_cbor.md) for the related CBOR format
- [from_msgpack](from_msgpack.md) for the related MessagePack format
- [from_ubjson](from_ubjson.md) for the related UBJSON format
+- [from_bjdata](from_bjdata.md) for the related BJData format
## Version history
diff --git a/docs/mkdocs/docs/api/basic_json/from_cbor.md b/docs/mkdocs/docs/api/basic_json/from_cbor.md
index c1d1410b4..d29c7bf7b 100644
--- a/docs/mkdocs/docs/api/basic_json/from_cbor.md
+++ b/docs/mkdocs/docs/api/basic_json/from_cbor.md
@@ -96,6 +96,14 @@ Linear in the size of the input.
--8<-- "examples/from_cbor.output"
```
+## See also
+
+- [to_cbor](to_cbor.md) create a CBOR serialization of a JSON value
+- [from_msgpack](from_msgpack.md) create a JSON value from an input in MessagePack format
+- [from_bson](from_bson.md) create a JSON value from an input in BSON format
+- [from_ubjson](from_ubjson.md) create a JSON value from an input in UBJSON format
+- [from_bjdata](from_bjdata.md) create a JSON value from an input in BJData format
+
## Version history
- Added in version 2.0.9.
diff --git a/docs/mkdocs/docs/api/basic_json/from_msgpack.md b/docs/mkdocs/docs/api/basic_json/from_msgpack.md
index 93c3acc5d..12469bca0 100644
--- a/docs/mkdocs/docs/api/basic_json/from_msgpack.md
+++ b/docs/mkdocs/docs/api/basic_json/from_msgpack.md
@@ -89,6 +89,14 @@ Linear in the size of the input.
--8<-- "examples/from_msgpack.output"
```
+## See also
+
+- [to_msgpack](to_msgpack.md) create a MessagePack serialization of a JSON value
+- [from_cbor](from_cbor.md) create a JSON value from an input in CBOR format
+- [from_bson](from_bson.md) create a JSON value from an input in BSON format
+- [from_ubjson](from_ubjson.md) create a JSON value from an input in UBJSON format
+- [from_bjdata](from_bjdata.md) create a JSON value from an input in BJData format
+
## Version history
- Added in version 2.0.9.
@@ -101,7 +109,7 @@ Linear in the size of the input.
- Overload (2) replaces calls to `from_msgpack` with a pointer and a length as first two parameters, which has been
deprecated in version 3.8.0. This overload will be removed in version 4.0.0. Please replace all calls like
`#!cpp from_msgpack(ptr, len, ...);` with `#!cpp from_msgpack(ptr, ptr+len, ...);`.
- - Overload (2) replaces calls to `from_cbor` with a pair of iterators as their first parameter, which has been
+ - Overload (2) replaces calls to `from_msgpack` with a pair of iterators as their first parameter, which has been
deprecated in version 3.8.0. This overload will be removed in version 4.0.0. Please replace all calls like
`#!cpp from_msgpack({ptr, ptr+len}, ...);` with `#!cpp from_msgpack(ptr, ptr+len, ...);`.
diff --git a/docs/mkdocs/docs/api/basic_json/from_ubjson.md b/docs/mkdocs/docs/api/basic_json/from_ubjson.md
index 084a2d8bb..a6621473d 100644
--- a/docs/mkdocs/docs/api/basic_json/from_ubjson.md
+++ b/docs/mkdocs/docs/api/basic_json/from_ubjson.md
@@ -65,8 +65,10 @@ Strong guarantee: if an exception is thrown, there are no changes in the JSON va
- Throws [parse_error.110](../../home/exceptions.md#jsonexceptionparse_error110) if the given input ends prematurely or
the end of the file was not reached when `strict` was set to true
- Throws [parse_error.112](../../home/exceptions.md#jsonexceptionparse_error112) if a parse error occurs
-- Throws [parse_error.113](../../home/exceptions.md#jsonexceptionparse_error113) if a string could not be parsed
+- Throws [parse_error.113](../../home/exceptions.md#jsonexceptionparse_error113) if a string could not be parsed
successfully
+- Throws [out_of_range.408](../../home/exceptions.md#jsonexceptionout_of_range408) if the size of an optimized container
+ or n-dimensional array cannot be represented by `std::size_t`
## Complexity
@@ -88,6 +90,14 @@ Linear in the size of the input.
--8<-- "examples/from_ubjson.output"
```
+## See also
+
+- [to_ubjson](to_ubjson.md) create a UBJSON serialization of a JSON value
+- [from_cbor](from_cbor.md) create a JSON value from an input in CBOR format
+- [from_msgpack](from_msgpack.md) create a JSON value from an input in MessagePack format
+- [from_bson](from_bson.md) create a JSON value from an input in BSON format
+- [from_bjdata](from_bjdata.md) create a JSON value from an input in BJData format
+
## Version history
- Added in version 3.1.0.
diff --git a/docs/mkdocs/docs/api/basic_json/get.md b/docs/mkdocs/docs/api/basic_json/get.md
index 68a4fa7a0..9b78d3dd0 100644
--- a/docs/mkdocs/docs/api/basic_json/get.md
+++ b/docs/mkdocs/docs/api/basic_json/get.md
@@ -88,6 +88,11 @@ constexpr const PointerType get_ptr() const noexcept;
Depends on what `json_serializer` `from_json()` method throws
+## Complexity
+
+Depends on the `json_serializer::from_json()` implementation for overloads (1) and (2); constant for
+overload (3).
+
## Notes
!!! danger "Undefined behavior for pointers"
@@ -144,6 +149,13 @@ Depends on what `json_serializer` `from_json()` method throws
--8<-- "examples/get__PointerType.output"
```
+## See also
+
+- [get_to](get_to.md) convert and write into a passed value
+- [get_ptr](get_ptr.md) get a pointer to the stored value
+- [get_ref](get_ref.md) get a reference to the stored value
+- [operator ValueType](operator_ValueType.md) get a value via implicit conversion
+
## Version history
1. Since version 2.1.0.
diff --git a/docs/mkdocs/docs/api/basic_json/get_binary.md b/docs/mkdocs/docs/api/basic_json/get_binary.md
index a910f3aa5..569e72274 100644
--- a/docs/mkdocs/docs/api/basic_json/get_binary.md
+++ b/docs/mkdocs/docs/api/basic_json/get_binary.md
@@ -40,6 +40,11 @@ Constant.
--8<-- "examples/get_binary.output"
```
+## See also
+
+- [get](get.md) get a value (explicit conversion)
+- [get_ref](get_ref.md) get a reference to the stored value
+
## Version history
- Added in version 3.8.0.
diff --git a/docs/mkdocs/docs/api/basic_json/get_to.md b/docs/mkdocs/docs/api/basic_json/get_to.md
index 6af6d212c..3c3764aec 100644
--- a/docs/mkdocs/docs/api/basic_json/get_to.md
+++ b/docs/mkdocs/docs/api/basic_json/get_to.md
@@ -34,6 +34,10 @@ the input parameter, allowing chaining calls
Depends on what `json_serializer` `from_json()` method throws
+## Complexity
+
+Depends on the `json_serializer::from_json()` implementation.
+
## Examples
??? example
@@ -53,6 +57,12 @@ Depends on what `json_serializer` `from_json()` method throws
--8<-- "examples/get_to.output"
```
+## See also
+
+- [get](get.md) get a value (explicit conversion)
+- [get_ref](get_ref.md) get a reference to the stored value
+- [get_ptr](get_ptr.md) get a pointer to the stored value
+
## Version history
- Since version 3.3.0.
diff --git a/docs/mkdocs/docs/api/basic_json/insert.md b/docs/mkdocs/docs/api/basic_json/insert.md
index 160b0d434..14d5823c1 100644
--- a/docs/mkdocs/docs/api/basic_json/insert.md
+++ b/docs/mkdocs/docs/api/basic_json/insert.md
@@ -96,8 +96,8 @@ Strong exception safety: if an exception occurs, the original value stays intact
5. The function can throw the following exceptions:
- Throws [`type_error.309`](../../home/exceptions.md#jsonexceptiontype_error309) if called on JSON values other than
objects; example: `"cannot use insert() with string"`
- - Throws [`invalid_iterator.202`](../../home/exceptions.md#jsonexceptioninvalid_iterator202) if called on an
- iterator which does not belong to the current JSON value; example: `"iterator does not fit current value"`
+ - Throws [`invalid_iterator.202`](../../home/exceptions.md#jsonexceptioninvalid_iterator202) if `first` or `last`
+ do not point to an object; example: `"iterators first and last must point to objects"`
- Throws [`invalid_iterator.210`](../../home/exceptions.md#jsonexceptioninvalid_iterator210) if `first` and `last`
do not belong to the same JSON value; example: `"iterators do not fit"`
@@ -181,6 +181,13 @@ Strong exception safety: if an exception occurs, the original value stays intact
--8<-- "examples/insert__range_object.output"
```
+## See also
+
+- [emplace](emplace.md) add a value to an object
+- [emplace_back](emplace_back.md) add a value to an array
+- [push_back](push_back.md) add a value to an array/object
+- [update](update.md) merges objects
+
## Version history
1. Added in version 1.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/invalid_iterator.md b/docs/mkdocs/docs/api/basic_json/invalid_iterator.md
index 3f0f75356..6c19a3e7e 100644
--- a/docs/mkdocs/docs/api/basic_json/invalid_iterator.md
+++ b/docs/mkdocs/docs/api/basic_json/invalid_iterator.md
@@ -66,6 +66,7 @@ classDiagram
## See also
+- [`exception`](exception.md) for the base class of all exceptions thrown by the library
- [List of iterator errors](../../home/exceptions.md#iterator-errors)
- [`parse_error`](parse_error.md) for exceptions indicating a parse error
- [`type_error`](type_error.md) for exceptions indicating executing a member function with a wrong type
diff --git a/docs/mkdocs/docs/api/basic_json/is_discarded.md b/docs/mkdocs/docs/api/basic_json/is_discarded.md
index 663cbf889..56fae2a49 100644
--- a/docs/mkdocs/docs/api/basic_json/is_discarded.md
+++ b/docs/mkdocs/docs/api/basic_json/is_discarded.md
@@ -45,11 +45,13 @@ Constant.
When a value is discarded by a callback function (see [`parser_callback_t`](parser_callback_t.md)) during parsing,
then it is removed when it is part of a structured value. For instance, if the second value of an array is discarded,
- instead of `#!json [null, discarded, false]`, the array `#!json [null, false]` is returned. Only if the top-level
- value is discarded, the return value of the `parse` call is discarded.
+ instead of `#!json [null, discarded, false]`, the array `#!json [null, false]` is returned. If the top-level value
+ itself is discarded by the callback, the `parse` call returns a `#!json null` value.
-This function will always be `#!cpp false` for JSON values after parsing. That is, discarded values can only occur
-during parsing, but will be removed when inside a structured value or replaced by null in other cases.
+After a successful parse, this function always returns `#!cpp false`: discarded values can only occur during parsing and
+are either removed when inside a structured value or replaced by `#!json null` at the top level. The exception is parsing
+with `allow_exceptions` set to `#!cpp false`: a parse error then yields a discarded value for which this function returns
+`#!cpp true` (see [`parse`](parse.md)).
## Examples
diff --git a/docs/mkdocs/docs/api/basic_json/is_number.md b/docs/mkdocs/docs/api/basic_json/is_number.md
index 2f6d63565..afb30bb0c 100644
--- a/docs/mkdocs/docs/api/basic_json/is_number.md
+++ b/docs/mkdocs/docs/api/basic_json/is_number.md
@@ -9,7 +9,7 @@ unsigned) and floating-point values.
## Return value
-`#!cpp true` if type is number (regardless whether integer, unsigned integer, or floating-type), `#!cpp false` otherwise.
+`#!cpp true` if type is number (regardless whether integer, unsigned integer, or floating-point), `#!cpp false` otherwise.
## Exception safety
diff --git a/docs/mkdocs/docs/api/basic_json/items.md b/docs/mkdocs/docs/api/basic_json/items.md
index be32bbfd9..a45ebdf86 100644
--- a/docs/mkdocs/docs/api/basic_json/items.md
+++ b/docs/mkdocs/docs/api/basic_json/items.md
@@ -84,6 +84,11 @@ When iterating over an array, `key()` will return the index of the element as st
--8<-- "examples/items.output"
```
+## See also
+
+- [begin](begin.md) returns an iterator to the first element
+- [end](end.md) returns an iterator to one past the last element
+
## Version history
- Added `iterator_wrapper` in version 3.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/meta.md b/docs/mkdocs/docs/api/basic_json/meta.md
index c584f9b6d..55476c5f3 100644
--- a/docs/mkdocs/docs/api/basic_json/meta.md
+++ b/docs/mkdocs/docs/api/basic_json/meta.md
@@ -13,7 +13,7 @@ JSON object holding version information
| key | description |
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `compiler` | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version). |
+| `compiler` | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version). On HP aCC compilers, `compiler` is instead the plain string `hp`. |
| `copyright` | The copyright line for the library as string. |
| `name` | The name of the library as string. |
| `platform` | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`. |
diff --git a/docs/mkdocs/docs/api/basic_json/number_integer_t.md b/docs/mkdocs/docs/api/basic_json/number_integer_t.md
index cef3f2001..79cbdf8ca 100644
--- a/docs/mkdocs/docs/api/basic_json/number_integer_t.md
+++ b/docs/mkdocs/docs/api/basic_json/number_integer_t.md
@@ -32,7 +32,6 @@ With the default values for `NumberIntegerType` (`std::int64_t`), the default va
- The restrictions about leading zeros are not enforced in C++. Instead, leading zeros in integer literals lead to an
interpretation as an octal number. Internally, the value will be stored as a decimal number. For instance, the C++
integer literal `010` will be serialized to `8`. During deserialization, leading zeros yield an error.
-- Not-a-number (NaN) values will be serialized to `null`.
#### Limits
diff --git a/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md b/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md
index 79b1c486c..f1010f2a6 100644
--- a/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md
+++ b/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md
@@ -32,7 +32,6 @@ With the default values for `NumberUnsignedType` (`std::uint64_t`), the default
- The restrictions about leading zeros are not enforced in C++. Instead, leading zeros in integer literals lead to an
interpretation as an octal number. Internally, the value will be stored as a decimal number. For instance, the C++
integer literal `010` will be serialized to `8`. During deserialization, leading zeros yield an error.
-- Not-a-number (NaN) values will be serialized to `null`.
#### Limits
@@ -45,7 +44,7 @@ when used in a constructor. During deserialization, too large or small integer n
as [`number_integer_t`](number_integer_t.md) or [`number_float_t`](number_float_t.md).
[RFC 8259](https://tools.ietf.org/html/rfc8259) further states:
-> Note that when such software is used, numbers that are integers and are in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are
+> Note that when such software is used, numbers that are integers and are in the range $[-2^{53}+1, 2^{53}-1]$ are
> interoperable in the sense that implementations will agree exactly on their numeric values.
As this range is a subrange (when considered in conjunction with the `number_integer_t` type) of the exactly supported
diff --git a/docs/mkdocs/docs/api/basic_json/operator+=.md b/docs/mkdocs/docs/api/basic_json/operator+=.md
index 473b82a4e..f296d5c4a 100644
--- a/docs/mkdocs/docs/api/basic_json/operator+=.md
+++ b/docs/mkdocs/docs/api/basic_json/operator+=.md
@@ -50,9 +50,12 @@ invalidates all iterators and all references.
## Exceptions
-All functions can throw the following exception:
- - Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
- JSON array or null; example: `"cannot use operator+=() with number"`
+1. Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
+ JSON array or null; example: `"cannot use push_back() with number"`
+2. Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
+ JSON object or null; example: `"cannot use push_back() with number"`
+3. Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
+ JSON array or null; example: `"cannot use push_back() with number"`
## Complexity
diff --git a/docs/mkdocs/docs/api/basic_json/operator=.md b/docs/mkdocs/docs/api/basic_json/operator=.md
index 4e0b91446..4639783de 100644
--- a/docs/mkdocs/docs/api/basic_json/operator=.md
+++ b/docs/mkdocs/docs/api/basic_json/operator=.md
@@ -5,7 +5,8 @@ basic_json& operator=(basic_json other) noexcept (
std::is_nothrow_move_constructible::value &&
std::is_nothrow_move_assignable::value &&
std::is_nothrow_move_constructible::value &&
- std::is_nothrow_move_assignable::value
+ std::is_nothrow_move_assignable::value &&
+ std::is_nothrow_move_assignable::value
);
```
@@ -17,6 +18,10 @@ constructor, destructor, and the `swap()` member function.
`other` (in)
: value to copy from
+## Exception safety
+
+Strong guarantee: if an exception is thrown while copying `other`, there are no changes to `#!cpp *this`.
+
## Complexity
Linear.
@@ -38,6 +43,11 @@ Linear.
--8<-- "examples/basic_json__copyassignment.output"
```
+## See also
+
+- [basic_json](basic_json.md) create a JSON value
+- [swap](swap.md) exchanges the contents of two JSON values
+
## Version history
- Added in version 1.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/operator[].md b/docs/mkdocs/docs/api/basic_json/operator[].md
index 3eebd562a..5109cdcac 100644
--- a/docs/mkdocs/docs/api/basic_json/operator[].md
+++ b/docs/mkdocs/docs/api/basic_json/operator[].md
@@ -83,6 +83,8 @@ Strong exception safety: if an exception occurs, the original value stays intact
in the passed JSON pointer `ptr` for the const version.
- Throws [`out_of_range.404`](../../home/exceptions.md#jsonexceptionout_of_range404) if the JSON pointer `ptr` can
not be resolved.
+ - Throws [`out_of_range.410`](../../home/exceptions.md#jsonexceptionout_of_range410) if an array index in the passed
+ JSON pointer `ptr` exceeds the range of `size_type` (e.g., on 32-bit platforms).
## Complexity
@@ -95,7 +97,10 @@ Strong exception safety: if an exception occurs, the original value stays intact
!!! danger "Undefined behavior and runtime assertions"
- 1. If the element with key `idx` does not exist, the behavior is undefined.
+ The following cases apply to the **const** overloads; the non-const overloads instead insert the missing element
+ (see the notes below).
+
+ 1. If the element at index `idx` does not exist, the behavior is undefined.
2. If the element with key `key` does not exist, the behavior is undefined and is **guarded by a
[runtime assertion](../../features/assertions.md)**!
diff --git a/docs/mkdocs/docs/api/basic_json/operator_ValueType.md b/docs/mkdocs/docs/api/basic_json/operator_ValueType.md
index bf38a3d21..110509b1c 100644
--- a/docs/mkdocs/docs/api/basic_json/operator_ValueType.md
+++ b/docs/mkdocs/docs/api/basic_json/operator_ValueType.md
@@ -75,6 +75,10 @@ Linear in the size of the JSON value.
--8<-- "examples/operator__ValueType.output"
```
+## See also
+
+- [get](get.md) get a value (explicit conversion)
+
## Version history
- Since version 1.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/operator_eq.md b/docs/mkdocs/docs/api/basic_json/operator_eq.md
index a2ce6155c..b575622d1 100644
--- a/docs/mkdocs/docs/api/basic_json/operator_eq.md
+++ b/docs/mkdocs/docs/api/basic_json/operator_eq.md
@@ -20,7 +20,7 @@ class basic_json {
```
1. Compares two JSON values for equality according to the following rules:
- - Two JSON values are equal if (1) neither value is discarded, or (2) they are of the same type and their stored
+ - Two JSON values are equal if (1) neither value is discarded, and (2) they are of the same type and their stored
values are the same according to their respective `operator==`.
- Integer and floating-point numbers are automatically converted before comparison.
@@ -79,13 +79,13 @@ Linear.
}
```
- Or you can self-defined operator equal function like this:
+ Or you can define your own equality function like this:
```cpp
bool my_equal(const_reference lhs, const_reference rhs)
{
- const auto lhs_type lhs.type();
- const auto rhs_type rhs.type();
+ const auto lhs_type = lhs.type();
+ const auto rhs_type = rhs.type();
if (lhs_type == rhs_type)
{
switch(lhs_type)
@@ -162,6 +162,11 @@ Linear.
--8<-- "examples/operator__equal__nullptr_t.output"
```
+## See also
+
+- [operator!=](operator_ne.md) compare for inequality
+- [operator<=>](operator_spaceship.md) comparison: 3-way (C++20)
+
## Version history
1. Added in version 1.0.0. Added C++20 member functions in version 3.11.0.
diff --git a/docs/mkdocs/docs/api/basic_json/operator_ge.md b/docs/mkdocs/docs/api/basic_json/operator_ge.md
index d4e2fb4a5..9ae6ada86 100644
--- a/docs/mkdocs/docs/api/basic_json/operator_ge.md
+++ b/docs/mkdocs/docs/api/basic_json/operator_ge.md
@@ -35,7 +35,7 @@ bool operator>=(ScalarType lhs, const const_reference rhs) noexcept; // (2)
## Return value
-whether `lhs` is less than or equal to `rhs`
+whether `lhs` is greater than or equal to `rhs`
## Exception safety
diff --git a/docs/mkdocs/docs/api/basic_json/other_error.md b/docs/mkdocs/docs/api/basic_json/other_error.md
index 251c0f3d4..7019e75c5 100644
--- a/docs/mkdocs/docs/api/basic_json/other_error.md
+++ b/docs/mkdocs/docs/api/basic_json/other_error.md
@@ -66,6 +66,7 @@ classDiagram
## See also
+- [`exception`](exception.md) for the base class of all exceptions thrown by the library
- [List of other errors](../../home/exceptions.md#further-exceptions)
- [`parse_error`](parse_error.md) for exceptions indicating a parse error
- [`invalid_iterator`](invalid_iterator.md) for exceptions indicating errors with iterators
diff --git a/docs/mkdocs/docs/api/basic_json/out_of_range.md b/docs/mkdocs/docs/api/basic_json/out_of_range.md
index 3b6178999..e1e54ae07 100644
--- a/docs/mkdocs/docs/api/basic_json/out_of_range.md
+++ b/docs/mkdocs/docs/api/basic_json/out_of_range.md
@@ -67,6 +67,7 @@ classDiagram
## See also
+- [`exception`](exception.md) for the base class of all exceptions thrown by the library
- [List of out-of-range errors](../../home/exceptions.md#out-of-range)
- [`parse_error`](parse_error.md) for exceptions indicating a parse error
- [`invalid_iterator`](invalid_iterator.md) for exceptions indicating errors with iterators
diff --git a/docs/mkdocs/docs/api/basic_json/parse.md b/docs/mkdocs/docs/api/basic_json/parse.md
index 7baa16b89..4da93ae42 100644
--- a/docs/mkdocs/docs/api/basic_json/parse.md
+++ b/docs/mkdocs/docs/api/basic_json/parse.md
@@ -81,9 +81,6 @@ Strong guarantee: if an exception is thrown, there are no changes in the JSON va
- Throws [`parse_error.101`](../../home/exceptions.md#jsonexceptionparse_error101) in case of an unexpected token, or
empty input like a null `FILE*` or `char*` pointer.
-- Throws [`parse_error.102`](../../home/exceptions.md#jsonexceptionparse_error102) if `to_unicode` fails or surrogate
- error.
-- Throws [`parse_error.103`](../../home/exceptions.md#jsonexceptionparse_error103) if `to_unicode` fails.
## Complexity
@@ -95,6 +92,9 @@ super-linear complexity.
A UTF-8 byte order mark is silently ignored.
+Invalid Unicode escapes and unpaired surrogates in the input are reported as
+[`parse_error.101`](../../home/exceptions.md#jsonexceptionparse_error101) with a detailed message.
+
## Examples
??? example "Parsing from a character array"
@@ -183,7 +183,7 @@ A UTF-8 byte order mark is silently ignored.
??? example "Effect of `allow_exceptions` parameter"
- The example below demonstrates the effect of the `allow_exceptions` parameter in the ´parse()` function.
+ The example below demonstrates the effect of the `allow_exceptions` parameter in the `parse()` function.
```cpp
--8<-- "examples/parse__allow_exceptions.cpp"
@@ -226,6 +226,7 @@ A UTF-8 byte order mark is silently ignored.
## See also
- [accept](accept.md) - check if the input is valid JSON
+- [sax_parse](sax_parse.md) - parse input using the SAX interface
- [operator>>](../operator_gtgt.md) - deserialize from stream
## Version history
@@ -234,7 +235,7 @@ A UTF-8 byte order mark is silently ignored.
- Overload for contiguous containers (1) added in version 2.0.3.
- Ignoring comments via `ignore_comments` added in version 3.9.0.
- Changed [runtime assertion](../../features/assertions.md) in case of `FILE*` null pointers to exception in version 3.12.0.
-- Added `ignore_trailing_commas` in version 3.12.1.
+- Added `ignore_trailing_commas` in version 3.12.x.
!!! warning "Deprecation"
diff --git a/docs/mkdocs/docs/api/basic_json/parse_error.md b/docs/mkdocs/docs/api/basic_json/parse_error.md
index 93986e543..9931d5463 100644
--- a/docs/mkdocs/docs/api/basic_json/parse_error.md
+++ b/docs/mkdocs/docs/api/basic_json/parse_error.md
@@ -75,6 +75,7 @@ or the end of file. This also holds true when reading a byte vector for binary f
## See also
+- [`exception`](exception.md) for the base class of all exceptions thrown by the library
- [List of parse errors](../../home/exceptions.md#parse-errors)
- [`invalid_iterator`](invalid_iterator.md) for exceptions indicating errors with iterators
- [`type_error`](type_error.md) for exceptions indicating executing a member function with a wrong type
diff --git a/docs/mkdocs/docs/api/basic_json/parse_event_t.md b/docs/mkdocs/docs/api/basic_json/parse_event_t.md
index 1a7c39038..36cba925f 100644
--- a/docs/mkdocs/docs/api/basic_json/parse_event_t.md
+++ b/docs/mkdocs/docs/api/basic_json/parse_event_t.md
@@ -24,6 +24,11 @@ The parser callback distinguishes the following events:

+## See also
+
+- [parser_callback_t](parser_callback_t.md) callback function type for the parser
+- [parse](parse.md) deserialize from a compatible input
+
## Version history
- Added in version 1.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/parser_callback_t.md b/docs/mkdocs/docs/api/basic_json/parser_callback_t.md
index e10402ea9..460f69cbb 100644
--- a/docs/mkdocs/docs/api/basic_json/parser_callback_t.md
+++ b/docs/mkdocs/docs/api/basic_json/parser_callback_t.md
@@ -68,6 +68,11 @@ the latter case, it is either skipped completely or replaced by an empty discard
--8<-- "examples/parse__string__parser_callback_t.output"
```
+## See also
+
+- [parse](parse.md) deserialize from a compatible input
+- [parse_event_t](parse_event_t.md) enumeration of parser events
+
## Version history
- Added in version 1.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/patch.md b/docs/mkdocs/docs/api/basic_json/patch.md
index 0f6387a69..c0fd3c113 100644
--- a/docs/mkdocs/docs/api/basic_json/patch.md
+++ b/docs/mkdocs/docs/api/basic_json/patch.md
@@ -32,7 +32,7 @@ Strong guarantee: if an exception is thrown, there are no changes in the JSON va
could not be resolved successfully in the current JSON value; example: `"key baz not found"`.
- Throws [`out_of_range.405`](../../home/exceptions.md#jsonexceptionout_of_range405) if JSON pointer has no parent
("add", "remove", "move")
-- Throws [`out_of_range.501`](../../home/exceptions.md#jsonexceptionother_error501) if "test" operation was
+- Throws [`other_error.501`](../../home/exceptions.md#jsonexceptionother_error501) if "test" operation was
unsuccessful.
## Complexity
diff --git a/docs/mkdocs/docs/api/basic_json/patch_inplace.md b/docs/mkdocs/docs/api/basic_json/patch_inplace.md
index 6cc13e102..52e279227 100644
--- a/docs/mkdocs/docs/api/basic_json/patch_inplace.md
+++ b/docs/mkdocs/docs/api/basic_json/patch_inplace.md
@@ -1,7 +1,7 @@
# nlohmann::basic_json::patch_inplace
```cpp
-void patch_inplace(const basic_json& json_patch) const;
+void patch_inplace(const basic_json& json_patch);
```
[JSON Patch](http://jsonpatch.com) defines a JSON document structure for expressing a sequence of operations to apply to
@@ -28,7 +28,7 @@ No guarantees, value may be corrupted by an unsuccessful patch operation.
could not be resolved successfully in the current JSON value; example: `"key baz not found"`.
- Throws [`out_of_range.405`](../../home/exceptions.md#jsonexceptionout_of_range405) if JSON pointer has no parent
("add", "remove", "move")
-- Throws [`out_of_range.501`](../../home/exceptions.md#jsonexceptionother_error501) if "test" operation was
+- Throws [`other_error.501`](../../home/exceptions.md#jsonexceptionother_error501) if "test" operation was
unsuccessful.
## Complexity
@@ -62,7 +62,7 @@ function throws an exception.
- [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
- [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901)
-- [patch](patch.md) applies a JSON Merge Patch
+- [patch](patch.md) applies a JSON Patch
- [merge_patch](merge_patch.md) applies a JSON Merge Patch
## Version history
diff --git a/docs/mkdocs/docs/api/basic_json/push_back.md b/docs/mkdocs/docs/api/basic_json/push_back.md
index 49f185c56..8a0fc9d9d 100644
--- a/docs/mkdocs/docs/api/basic_json/push_back.md
+++ b/docs/mkdocs/docs/api/basic_json/push_back.md
@@ -46,9 +46,12 @@ invalidates all iterators and all references.
## Exceptions
-All functions can throw the following exception:
- - Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
- JSON array or null; example: `"cannot use push_back() with number"`
+1. Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
+ JSON array or null; example: `"cannot use push_back() with number"`
+2. Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
+ JSON object or null; example: `"cannot use push_back() with number"`
+3. Throws [`type_error.308`](../../home/exceptions.md#jsonexceptiontype_error308) when called on a type other than
+ JSON array or null; example: `"cannot use push_back() with number"`
## Complexity
diff --git a/docs/mkdocs/docs/api/basic_json/rbegin.md b/docs/mkdocs/docs/api/basic_json/rbegin.md
index 126c47127..5fbbe7d3b 100644
--- a/docs/mkdocs/docs/api/basic_json/rbegin.md
+++ b/docs/mkdocs/docs/api/basic_json/rbegin.md
@@ -11,7 +11,7 @@ Returns an iterator to the reverse-beginning; that is, the last element.
## Return value
-reverse iterator to the first element
+reverse iterator to the last element
## Exception safety
diff --git a/docs/mkdocs/docs/api/basic_json/rend.md b/docs/mkdocs/docs/api/basic_json/rend.md
index 96da7a5f5..8eb1a6e55 100644
--- a/docs/mkdocs/docs/api/basic_json/rend.md
+++ b/docs/mkdocs/docs/api/basic_json/rend.md
@@ -26,7 +26,7 @@ Constant.
??? example
- The following code shows an example for `eend()`.
+ The following code shows an example for `rend()`.
```cpp
--8<-- "examples/rend.cpp"
diff --git a/docs/mkdocs/docs/api/basic_json/sax_parse.md b/docs/mkdocs/docs/api/basic_json/sax_parse.md
index 94e9d5495..f0900941c 100644
--- a/docs/mkdocs/docs/api/basic_json/sax_parse.md
+++ b/docs/mkdocs/docs/api/basic_json/sax_parse.md
@@ -43,10 +43,11 @@ The SAX event lister must follow the interface of [`json_sax`](../json_sax/index
iterators.
`IteratorType`
-: Description
+: a compatible iterator type for overload (2); a pair of character iterators whose `value_type` is an integral type
+ with a size of 1, 2, or 4 bytes (interpreted respectively as UTF-8, UTF-16, and UTF-32)
`SAX`
-: Description
+: a class fulfilling the SAX event listener interface; see [`json_sax`](../json_sax/index.md)
## Parameters
@@ -89,9 +90,6 @@ Strong guarantee: if an exception is thrown, there are no changes in the JSON va
- Throws [`parse_error.101`](../../home/exceptions.md#jsonexceptionparse_error101) in case of an unexpected token, or
empty input like a null `FILE*` or `char*` pointer.
-- Throws [`parse_error.102`](../../home/exceptions.md#jsonexceptionparse_error102) if `to_unicode` fails or surrogate
- error.
-- Throws [`parse_error.103`](../../home/exceptions.md#jsonexceptionparse_error103) if `to_unicode` fails.
## Complexity
@@ -119,11 +117,16 @@ A UTF-8 byte order mark is silently ignored.
--8<-- "examples/sax_parse.output"
```
+## See also
+
+- [parse](parse.md) - deserialize from a compatible input
+- [accept](accept.md) - check if the input is valid JSON
+
## Version history
- Added in version 3.2.0.
- Ignoring comments via `ignore_comments` added in version 3.9.0.
-- Added `ignore_trailing_commas` in version 3.12.1.
+- Added `ignore_trailing_commas` in version 3.12.x.
!!! warning "Deprecation"
diff --git a/docs/mkdocs/docs/api/basic_json/std_swap.md b/docs/mkdocs/docs/api/basic_json/std_swap.md
index d30f3bccd..f93830ff4 100644
--- a/docs/mkdocs/docs/api/basic_json/std_swap.md
+++ b/docs/mkdocs/docs/api/basic_json/std_swap.md
@@ -16,6 +16,14 @@ Exchanges the values of two JSON objects.
`j2` (in, out)
: value to be replaced by `j1`
+## Exception safety
+
+No-throw guarantee: this function never throws exceptions.
+
+## Complexity
+
+Constant.
+
## Possible implementation
```cpp
diff --git a/docs/mkdocs/docs/api/basic_json/string_t.md b/docs/mkdocs/docs/api/basic_json/string_t.md
index 3ab4412dd..dc85fcd4d 100644
--- a/docs/mkdocs/docs/api/basic_json/string_t.md
+++ b/docs/mkdocs/docs/api/basic_json/string_t.md
@@ -9,7 +9,7 @@ The type used to store JSON strings.
[RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON strings as follows:
> A string is a sequence of zero or more Unicode characters.
-To store objects in C++, a type is defined by the template parameter described below. Unicode values are split by the
+To store strings in C++, a type is defined by the template parameter described below. Unicode values are split by the
JSON class into byte-sized characters during deserialization.
## Template parameters
diff --git a/docs/mkdocs/docs/api/basic_json/swap.md b/docs/mkdocs/docs/api/basic_json/swap.md
index a5730ffa7..3a3d288fb 100644
--- a/docs/mkdocs/docs/api/basic_json/swap.md
+++ b/docs/mkdocs/docs/api/basic_json/swap.md
@@ -2,10 +2,20 @@
```cpp
// (1)
-void swap(reference other) noexcept;
+void swap(reference other) noexcept (
+ std::is_nothrow_move_constructible::value &&
+ std::is_nothrow_move_assignable::value &&
+ std::is_nothrow_move_constructible::value &&
+ std::is_nothrow_move_assignable::value
+);
// (2)
-void swap(reference left, reference right) noexcept;
+friend void swap(reference left, reference right) noexcept (
+ std::is_nothrow_move_constructible::value &&
+ std::is_nothrow_move_assignable::value &&
+ std::is_nothrow_move_constructible::value &&
+ std::is_nothrow_move_assignable::value
+);
// (3)
void swap(array_t& other);
@@ -56,15 +66,15 @@ void swap(typename binary_t::container_type& other);
1. No-throw guarantee: this function never throws exceptions.
2. No-throw guarantee: this function never throws exceptions.
3. Throws [`type_error.310`](../../home/exceptions.md#jsonexceptiontype_error310) if called on JSON values other than
- arrays; example: `"cannot use swap() with boolean"`
+ arrays; example: `"cannot use swap(array_t&) with boolean"`
4. Throws [`type_error.310`](../../home/exceptions.md#jsonexceptiontype_error310) if called on JSON values other than
- objects; example: `"cannot use swap() with boolean"`
+ objects; example: `"cannot use swap(object_t&) with boolean"`
5. Throws [`type_error.310`](../../home/exceptions.md#jsonexceptiontype_error310) if called on JSON values other than
- strings; example: `"cannot use swap() with boolean"`
+ strings; example: `"cannot use swap(string_t&) with boolean"`
6. Throws [`type_error.310`](../../home/exceptions.md#jsonexceptiontype_error310) if called on JSON values other than
- binaries; example: `"cannot use swap() with boolean"`
+ binaries; example: `"cannot use swap(binary_t&) with boolean"`
7. Throws [`type_error.310`](../../home/exceptions.md#jsonexceptiontype_error310) if called on JSON values other than
- binaries; example: `"cannot use swap() with boolean"`
+ binaries; example: `"cannot use swap(binary_t::container_type&) with boolean"`
## Complexity
@@ -128,7 +138,7 @@ Constant.
--8<-- "examples/swap__string_t.output"
```
-??? example "Example: Swap string (6)"
+??? example "Example: Swap binary (6)"
The example below shows how binary values can be swapped with `swap()`.
@@ -145,6 +155,8 @@ Constant.
## See also
- [std::swap](std_swap.md)
+- [operator=](operator=.md) copy assignment
+- [basic_json](basic_json.md) create a JSON value
## Version history
diff --git a/docs/mkdocs/docs/api/basic_json/to_bjdata.md b/docs/mkdocs/docs/api/basic_json/to_bjdata.md
index 7aa331d02..9c1efb183 100644
--- a/docs/mkdocs/docs/api/basic_json/to_bjdata.md
+++ b/docs/mkdocs/docs/api/basic_json/to_bjdata.md
@@ -72,6 +72,14 @@ Linear in the size of the JSON value `j`.
--8<-- "examples/to_bjdata.output"
```
+## See also
+
+- [from_bjdata](from_bjdata.md) create a JSON value from an input in BJData format
+- [to_cbor](to_cbor.md) create a CBOR serialization of a JSON value
+- [to_msgpack](to_msgpack.md) create a MessagePack serialization of a JSON value
+- [to_bson](to_bson.md) create a BSON serialization of a JSON value
+- [to_ubjson](to_ubjson.md) create a UBJSON serialization of a JSON value
+
## Version history
- Added in version 3.11.0.
diff --git a/docs/mkdocs/docs/api/basic_json/to_bson.md b/docs/mkdocs/docs/api/basic_json/to_bson.md
index d0cae0ea3..cb199dc32 100644
--- a/docs/mkdocs/docs/api/basic_json/to_bson.md
+++ b/docs/mkdocs/docs/api/basic_json/to_bson.md
@@ -34,6 +34,13 @@ The exact mapping and its limitations are described on a [dedicated page](../../
Strong guarantee: if an exception is thrown, there are no changes in the JSON value.
+## Exceptions
+
+- Throws [`type_error.317`](../../home/exceptions.md#jsonexceptiontype_error317) if the top-level type of the JSON value
+ is not an object; example: `"to serialize to BSON, top-level type must be object, but is string"`
+- Throws [`out_of_range.409`](../../home/exceptions.md#jsonexceptionout_of_range409) if a key in the JSON object contains
+ a null byte (code point U+0000); example: `"BSON key cannot contain code point U+0000 (at byte 2)"`
+
## Complexity
Linear in the size of the JSON value `j`.
@@ -54,6 +61,14 @@ Linear in the size of the JSON value `j`.
--8<-- "examples/to_bson.output"
```
+## See also
+
+- [from_bson](from_bson.md) create a JSON value from an input in BSON format
+- [to_cbor](to_cbor.md) create a CBOR serialization of a JSON value
+- [to_msgpack](to_msgpack.md) create a MessagePack serialization of a JSON value
+- [to_ubjson](to_ubjson.md) create a UBJSON serialization of a JSON value
+- [to_bjdata](to_bjdata.md) create a BJData serialization of a JSON value
+
## Version history
- Added in version 3.4.0.
diff --git a/docs/mkdocs/docs/api/basic_json/to_cbor.md b/docs/mkdocs/docs/api/basic_json/to_cbor.md
index 81d66467b..93facfca0 100644
--- a/docs/mkdocs/docs/api/basic_json/to_cbor.md
+++ b/docs/mkdocs/docs/api/basic_json/to_cbor.md
@@ -55,6 +55,14 @@ Linear in the size of the JSON value `j`.
--8<-- "examples/to_cbor.output"
```
+## See also
+
+- [from_cbor](from_cbor.md) create a JSON value from an input in CBOR format
+- [to_msgpack](to_msgpack.md) create a MessagePack serialization of a JSON value
+- [to_bson](to_bson.md) create a BSON serialization of a JSON value
+- [to_ubjson](to_ubjson.md) create a UBJSON serialization of a JSON value
+- [to_bjdata](to_bjdata.md) create a BJData serialization of a JSON value
+
## Version history
- Added in version 2.0.9.
diff --git a/docs/mkdocs/docs/api/basic_json/to_msgpack.md b/docs/mkdocs/docs/api/basic_json/to_msgpack.md
index 3ae43a049..66b104f52 100644
--- a/docs/mkdocs/docs/api/basic_json/to_msgpack.md
+++ b/docs/mkdocs/docs/api/basic_json/to_msgpack.md
@@ -54,6 +54,14 @@ Linear in the size of the JSON value `j`.
--8<-- "examples/to_msgpack.output"
```
+## See also
+
+- [from_msgpack](from_msgpack.md) create a JSON value from an input in MessagePack format
+- [to_cbor](to_cbor.md) create a CBOR serialization of a JSON value
+- [to_bson](to_bson.md) create a BSON serialization of a JSON value
+- [to_ubjson](to_ubjson.md) create a UBJSON serialization of a JSON value
+- [to_bjdata](to_bjdata.md) create a BJData serialization of a JSON value
+
## Version history
- Added in version 2.0.9.
diff --git a/docs/mkdocs/docs/api/basic_json/to_ubjson.md b/docs/mkdocs/docs/api/basic_json/to_ubjson.md
index a27280314..39b184e74 100644
--- a/docs/mkdocs/docs/api/basic_json/to_ubjson.md
+++ b/docs/mkdocs/docs/api/basic_json/to_ubjson.md
@@ -65,6 +65,14 @@ Linear in the size of the JSON value `j`.
--8<-- "examples/to_ubjson.output"
```
+## See also
+
+- [from_ubjson](from_ubjson.md) create a JSON value from an input in UBJSON format
+- [to_cbor](to_cbor.md) create a CBOR serialization of a JSON value
+- [to_msgpack](to_msgpack.md) create a MessagePack serialization of a JSON value
+- [to_bson](to_bson.md) create a BSON serialization of a JSON value
+- [to_bjdata](to_bjdata.md) create a BJData serialization of a JSON value
+
## Version history
- Added in version 3.1.0.
diff --git a/docs/mkdocs/docs/api/basic_json/type_error.md b/docs/mkdocs/docs/api/basic_json/type_error.md
index 4d590556f..b13fdd278 100644
--- a/docs/mkdocs/docs/api/basic_json/type_error.md
+++ b/docs/mkdocs/docs/api/basic_json/type_error.md
@@ -67,6 +67,7 @@ classDiagram
## See also
+- [`exception`](exception.md) for the base class of all exceptions thrown by the library
- [List of type errors](../../home/exceptions.md#type-errors)
- [`parse_error`](parse_error.md) for exceptions indicating a parse error
- [`invalid_iterator`](invalid_iterator.md) for exceptions indicating errors with iterators
diff --git a/docs/mkdocs/docs/api/basic_json/unflatten.md b/docs/mkdocs/docs/api/basic_json/unflatten.md
index 5585cbc31..1af243b58 100644
--- a/docs/mkdocs/docs/api/basic_json/unflatten.md
+++ b/docs/mkdocs/docs/api/basic_json/unflatten.md
@@ -25,6 +25,10 @@ The function can throw the following exceptions:
- Throws [`type_error.314`](../../home/exceptions.md#jsonexceptiontype_error314) if value is not an object
- Throws [`type_error.315`](../../home/exceptions.md#jsonexceptiontype_error315) if object values are not primitive
+- Throws [`type_error.313`](../../home/exceptions.md#jsonexceptiontype_error313) if a key (JSON pointer) leads to a
+ conflicting nesting; example: `"invalid value to unflatten"`
+- Throws [`parse_error.109`](../../home/exceptions.md#jsonexceptionparse_error109) if an array index in a key is not a
+ number; example: `"array index 'one' is not a number"`
## Complexity
diff --git a/docs/mkdocs/docs/api/basic_json/update.md b/docs/mkdocs/docs/api/basic_json/update.md
index 267a70517..a9729d98f 100644
--- a/docs/mkdocs/docs/api/basic_json/update.md
+++ b/docs/mkdocs/docs/api/basic_json/update.md
@@ -14,6 +14,8 @@ void update(const_iterator first, const_iterator last, bool merge_objects = fals
When `merge_objects` is `#!c false` (default), existing keys are overwritten. When `merge_objects` is `#!c true`,
recursively merges objects with common keys.
+If the JSON value is `#!json null`, it is implicitly converted to an empty object before the values are inserted.
+
The function is motivated by Python's [dict.update](https://docs.python.org/3.6/library/stdtypes.html#dict.update)
function.
@@ -28,8 +30,8 @@ iterators (including the `end()` iterator) and all references to the elements ar
: JSON object to read values from
`merge_objects` (in)
-: when `#!c true`, existing keys are not overwritten, but contents of objects are merged recursively (default:
- `#!c false`)
+: when `#!c true`, keys that exist in both objects and whose value in the source is itself an object are merged
+ recursively; all other values are overwritten as usual (default: `#!c false`)
`first` (in)
: the beginning of the range of elements to insert
@@ -37,6 +39,10 @@ iterators (including the `end()` iterator) and all references to the elements ar
`last` (in)
: the end of the range of elements to insert
+## Exception safety
+
+Basic guarantee: if an exception is thrown during the operation, the JSON value may be partially modified.
+
## Exceptions
1. The function can throw the following exceptions:
@@ -45,8 +51,6 @@ iterators (including the `end()` iterator) and all references to the elements ar
2. The function can throw the following exceptions:
- Throws [`type_error.312`](../../home/exceptions.md#jsonexceptiontype_error312) if called on JSON values other than
objects; example: `"cannot use update() with string"`
- - Throws [`invalid_iterator.202`](../../home/exceptions.md#jsonexceptioninvalid_iterator202) if called on an
- iterator which does not belong to the current JSON value; example: `"iterator does not fit current value"`
- Throws [`invalid_iterator.210`](../../home/exceptions.md#jsonexceptioninvalid_iterator210) if `first` and `last`
do not belong to the same JSON value; example: `"iterators do not fit"`
@@ -141,6 +145,11 @@ iterators (including the `end()` iterator) and all references to the elements ar
}
```
+## See also
+
+- [insert](insert.md) add values to an array/object
+- [merge_patch](merge_patch.md) applies a JSON Merge Patch
+
## Version history
- Added in version 3.0.0.
diff --git a/docs/mkdocs/docs/api/basic_json/value.md b/docs/mkdocs/docs/api/basic_json/value.md
index 8b502c015..b0fd64989 100644
--- a/docs/mkdocs/docs/api/basic_json/value.md
+++ b/docs/mkdocs/docs/api/basic_json/value.md
@@ -95,7 +95,7 @@ changes to any JSON value.
- Throws [`type_error.302`](../../home/exceptions.md#jsonexceptiontype_error302) if `default_value` does not match
the type of the value at `ptr`
- Throws [`type_error.306`](../../home/exceptions.md#jsonexceptiontype_error306) if the JSON value is not an object;
- in that case, using `value()` with a key makes no sense.
+ in that case, using `value()` with a JSON pointer makes no sense.
## Complexity
diff --git a/docs/mkdocs/docs/api/byte_container_with_subtype/index.md b/docs/mkdocs/docs/api/byte_container_with_subtype/index.md
index 85c09079b..a9aafc1d2 100644
--- a/docs/mkdocs/docs/api/byte_container_with_subtype/index.md
+++ b/docs/mkdocs/docs/api/byte_container_with_subtype/index.md
@@ -24,7 +24,7 @@ specific naming scheme in order to override the binary type.
- [(constructor)](byte_container_with_subtype.md)
- **operator==** - comparison: equal
- **operator!=** - comparison: not equal
-- [**set_subtype**](subtype.md) - sets the binary subtype
+- [**set_subtype**](set_subtype.md) - sets the binary subtype
- [**subtype**](subtype.md) - return the binary subtype
- [**has_subtype**](has_subtype.md) - return whether the value has a subtype
- [**clear_subtype**](clear_subtype.md) - clears the binary subtype
diff --git a/docs/mkdocs/docs/api/json_pointer/front.md b/docs/mkdocs/docs/api/json_pointer/front.md
index 126f5ed90..ae078d19c 100644
--- a/docs/mkdocs/docs/api/json_pointer/front.md
+++ b/docs/mkdocs/docs/api/json_pointer/front.md
@@ -35,3 +35,5 @@ Constant.
```
## Version history
+
+- Added in version 3.12.x.
diff --git a/docs/mkdocs/docs/api/json_pointer/parent_pointer.md b/docs/mkdocs/docs/api/json_pointer/parent_pointer.md
index 139873072..d37889e7e 100644
--- a/docs/mkdocs/docs/api/json_pointer/parent_pointer.md
+++ b/docs/mkdocs/docs/api/json_pointer/parent_pointer.md
@@ -10,6 +10,10 @@ Returns the parent of this JSON pointer.
Parent of this JSON pointer; in case this JSON pointer is the root, the root itself is returned.
+## Exception safety
+
+No-throw guarantee: this function never throws exceptions.
+
## Complexity
Linear in the length of the JSON pointer.
@@ -30,6 +34,11 @@ Linear in the length of the JSON pointer.
--8<-- "examples/json_pointer__parent_pointer.output"
```
+## See also
+
+- [pop_back](pop_back.md) remove the last reference token
+- [back](back.md) return the last reference token
+
## Version history
Added in version 3.6.0.
diff --git a/docs/mkdocs/docs/api/json_pointer/pop_front.md b/docs/mkdocs/docs/api/json_pointer/pop_front.md
index a0bfc546a..ecd13ad28 100644
--- a/docs/mkdocs/docs/api/json_pointer/pop_front.md
+++ b/docs/mkdocs/docs/api/json_pointer/pop_front.md
@@ -31,3 +31,5 @@ Linear in the number of reference tokens in the `json_pointer`.
```
## Version history
+
+- Added in version 3.12.x.
diff --git a/docs/mkdocs/docs/api/json_pointer/push_front.md b/docs/mkdocs/docs/api/json_pointer/push_front.md
index 8d72f2363..dd522a48d 100644
--- a/docs/mkdocs/docs/api/json_pointer/push_front.md
+++ b/docs/mkdocs/docs/api/json_pointer/push_front.md
@@ -34,3 +34,5 @@ Linear in the number of reference tokens in the `json_pointer`.
```
## Version history
+
+- Added in version 3.12.x.
diff --git a/docs/mkdocs/docs/api/json_sax/start_array.md b/docs/mkdocs/docs/api/json_sax/start_array.md
index cf2b8cf56..1a221565f 100644
--- a/docs/mkdocs/docs/api/json_sax/start_array.md
+++ b/docs/mkdocs/docs/api/json_sax/start_array.md
@@ -9,7 +9,7 @@ The beginning of an array was read.
## Parameters
`elements` (in)
-: number of object elements or `#!cpp -1` if unknown
+: number of array elements, or `#!cpp std::numeric_limits::max()` if unknown
## Return value
diff --git a/docs/mkdocs/docs/api/json_sax/start_object.md b/docs/mkdocs/docs/api/json_sax/start_object.md
index 491815deb..5ae753805 100644
--- a/docs/mkdocs/docs/api/json_sax/start_object.md
+++ b/docs/mkdocs/docs/api/json_sax/start_object.md
@@ -9,7 +9,7 @@ The beginning of an object was read.
## Parameters
`elements` (in)
-: number of object elements or `#!cpp -1` if unknown
+: number of object elements, or `#!cpp std::numeric_limits::max()` if unknown
## Return value
diff --git a/docs/mkdocs/docs/api/macros/json_brace_init_copy_semantics.md b/docs/mkdocs/docs/api/macros/json_brace_init_copy_semantics.md
index 8d88acf47..b821a046d 100644
--- a/docs/mkdocs/docs/api/macros/json_brace_init_copy_semantics.md
+++ b/docs/mkdocs/docs/api/macros/json_brace_init_copy_semantics.md
@@ -92,4 +92,4 @@ The default value is `0` (disabled — existing behavior is preserved).
## Version history
-- Added in version 3.12.0.
+- Added in version 3.12.x.
diff --git a/docs/mkdocs/docs/api/macros/json_disable_enum_serialization.md b/docs/mkdocs/docs/api/macros/json_disable_enum_serialization.md
index e1418943d..2548a03fa 100644
--- a/docs/mkdocs/docs/api/macros/json_disable_enum_serialization.md
+++ b/docs/mkdocs/docs/api/macros/json_disable_enum_serialization.md
@@ -122,14 +122,13 @@ The default value is `0`.
void to_json(json& j, const Choice& ch)
{
- auto value = j.get();
- if (value == "first")
+ if (ch == Choice::first)
{
- ch = Choice::first;
+ j = "first";
}
- else if (value == "second")
+ else if (ch == Choice::second)
{
- ch = Choice::second;
+ j = "second";
}
}
diff --git a/docs/mkdocs/docs/api/macros/json_has_cpp_11.md b/docs/mkdocs/docs/api/macros/json_has_cpp_11.md
index f3eaa585c..6a30b55f0 100644
--- a/docs/mkdocs/docs/api/macros/json_has_cpp_11.md
+++ b/docs/mkdocs/docs/api/macros/json_has_cpp_11.md
@@ -1,10 +1,12 @@
-# JSON_HAS_CPP_11, JSON_HAS_CPP_14, JSON_HAS_CPP_17, JSON_HAS_CPP_20
+# JSON_HAS_CPP_11, JSON_HAS_CPP_14, JSON_HAS_CPP_17, JSON_HAS_CPP_20, JSON_HAS_CPP_23, JSON_HAS_CPP_26
```cpp
#define JSON_HAS_CPP_11
#define JSON_HAS_CPP_14
#define JSON_HAS_CPP_17
#define JSON_HAS_CPP_20
+#define JSON_HAS_CPP_23
+#define JSON_HAS_CPP_26
```
The library targets C++11, but also supports some features introduced in later C++ versions (e.g., `std::string_view`
@@ -20,7 +22,9 @@ The default value is detected based on preprocessor macros such as `#!cpp __cplu
## Notes
-- `#!cpp JSON_HAS_CPP_11` is always defined.
+- When the C++ standard is detected automatically, `#!cpp JSON_HAS_CPP_11` is always defined. When you override the
+ detection by defining one of these macros manually, the automatic detection is skipped entirely, so you should define
+ all applicable macros (including `#!cpp JSON_HAS_CPP_11`) yourself.
- All macros are undefined outside the library.
## Examples
@@ -39,3 +43,5 @@ The default value is detected based on preprocessor macros such as `#!cpp __cplu
## Version history
- Added in version 3.10.5.
+- Added `JSON_HAS_CPP_23` in version 3.12.0.
+- Added `JSON_HAS_CPP_26` in version 3.12.x.
diff --git a/docs/mkdocs/docs/api/macros/json_has_filesystem.md b/docs/mkdocs/docs/api/macros/json_has_filesystem.md
index 308aea2ac..15c87b636 100644
--- a/docs/mkdocs/docs/api/macros/json_has_filesystem.md
+++ b/docs/mkdocs/docs/api/macros/json_has_filesystem.md
@@ -21,7 +21,7 @@ The default value is detected based on the preprocessor macros `#!cpp __cpp_lib_
## Notes
-- Note that older compilers or older versions of libstd++ also require the library `stdc++fs` to be linked to for
+- Note that older compilers or older versions of libstdc++ also require the library `stdc++fs` to be linked to for
filesystem support.
- Both macros are undefined outside the library.
diff --git a/docs/mkdocs/docs/api/macros/json_skip_library_version_check.md b/docs/mkdocs/docs/api/macros/json_skip_library_version_check.md
index c9a743c18..37e91b3c6 100644
--- a/docs/mkdocs/docs/api/macros/json_skip_library_version_check.md
+++ b/docs/mkdocs/docs/api/macros/json_skip_library_version_check.md
@@ -24,6 +24,17 @@ By default, the macro is not defined.
## Examples
+??? example
+
+ The code below switches off the warning about including a different version of the library.
+
+ ```cpp
+ #define JSON_SKIP_LIBRARY_VERSION_CHECK 1
+ #include
+
+ ...
+ ```
+
!!! example
The following warning will be shown in case a different version of the library was already included:
diff --git a/docs/mkdocs/docs/api/macros/json_use_legacy_discarded_value_comparison.md b/docs/mkdocs/docs/api/macros/json_use_legacy_discarded_value_comparison.md
index b14266304..f026a9825 100644
--- a/docs/mkdocs/docs/api/macros/json_use_legacy_discarded_value_comparison.md
+++ b/docs/mkdocs/docs/api/macros/json_use_legacy_discarded_value_comparison.md
@@ -56,7 +56,7 @@ When the macro is not defined, the library will define it to its default value.
!!! hint "CMake option"
Legacy comparison can also be controlled with the CMake option
- [`JSON_LegacyDiscardedValueComparison`](../../integration/cmake.md#json_implicitconversions)
+ [`JSON_LegacyDiscardedValueComparison`](../../integration/cmake.md#json_legacydiscardedvaluecomparison)
(`OFF` by default) which defines `JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON` accordingly.
## Examples
@@ -72,7 +72,7 @@ When the macro is not defined, the library will define it to its default value.
...
```
-### See also
+## See also
- [:simple-cmake: JSON_LegacyDiscardedValueComparison](../../integration/cmake.md#json_legacydiscardedvaluecomparison) - CMake option to control the macro
diff --git a/docs/mkdocs/docs/api/macros/nlohmann_define_derived_type.md b/docs/mkdocs/docs/api/macros/nlohmann_define_derived_type.md
index 0d2056619..433d5b9a0 100644
--- a/docs/mkdocs/docs/api/macros/nlohmann_define_derived_type.md
+++ b/docs/mkdocs/docs/api/macros/nlohmann_define_derived_type.md
@@ -39,7 +39,7 @@ The base type **must** be already serializable/deserializable.
Summary:
-| Need access to private members | Need only de-serialization | Allow missing values when de-serializing | macro |
+| Need access to private members | Need only serialization | Allow missing values when de-serializing | macro |
|------------------------------------------------------------------|------------------------------------------------------------------|------------------------------------------------------------------|---------------------------------------------------------------|
| :octicons-check-circle-fill-24:
| :octicons-x-circle-fill-24:
| :octicons-x-circle-fill-24:
| **NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE** |
| :octicons-check-circle-fill-24:
| :octicons-x-circle-fill-24:
| :octicons-check-circle-fill-24:
| **NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT** |
@@ -160,10 +160,10 @@ void to_json(BasicJsonType& j, const B& b) {
## See also
- [NLOHMANN_DEFINE_TYPE_INTRUSIVE / NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT /
- NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE](nlohmann_define_type_intrusive.md)
+ NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE](nlohmann_define_type_intrusive.md)
for similar macros that can be defined _inside_ a non-derived type.
- [NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE / NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT /
- NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE](nlohmann_define_type_non_intrusive.md)
+ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE](nlohmann_define_type_non_intrusive.md)
for similar macros that can be defined _outside_ a non-derived type.
- [Arbitrary Type Conversions](../../features/arbitrary_types.md) for an overview.
diff --git a/docs/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md b/docs/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md
index 629ae2522..b1ccc3975 100644
--- a/docs/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md
+++ b/docs/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md
@@ -21,7 +21,7 @@ parameter is the name of the class/struct, and all remaining parameters name the
Summary:
-| Need access to private members | Need only de-serialization | Allow missing values when de-serializing | macro |
+| Need access to private members | Need only serialization | Allow missing values when de-serializing | macro |
|------------------------------------------------------------------|------------------------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------|
| :octicons-check-circle-fill-24:
| :octicons-x-circle-fill-24:
| :octicons-x-circle-fill-24:
| **NLOHMANN_DEFINE_TYPE_INTRUSIVE** |
| :octicons-check-circle-fill-24:
| :octicons-x-circle-fill-24:
| :octicons-check-circle-fill-24:
| **NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT** |
diff --git a/docs/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md b/docs/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md
index 7feb8dbe3..0b28189d1 100644
--- a/docs/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md
+++ b/docs/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md
@@ -21,7 +21,7 @@ parameter is the name of the class/struct, and all remaining parameters name the
Summary:
-| Need access to private members | Need only de-serialization | Allow missing values when de-serializing | macro |
+| Need access to private members | Need only serialization | Allow missing values when de-serializing | macro |
|------------------------------------------------------------------|------------------------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------|
| :octicons-x-circle-fill-24:
| :octicons-x-circle-fill-24:
| :octicons-x-circle-fill-24:
| **NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE** |
| :octicons-x-circle-fill-24:
| :octicons-x-circle-fill-24:
| :octicons-check-circle-fill-24:
| **NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT** |
diff --git a/docs/mkdocs/docs/api/macros/nlohmann_define_type_with_names.md b/docs/mkdocs/docs/api/macros/nlohmann_define_type_with_names.md
index 798be4b80..d8640496a 100644
--- a/docs/mkdocs/docs/api/macros/nlohmann_define_type_with_names.md
+++ b/docs/mkdocs/docs/api/macros/nlohmann_define_type_with_names.md
@@ -75,4 +75,4 @@ For further information please refer to the corresponding macros without `WITH_N
## Version history
-1. Added in version 3.11.x.
+1. Added in version 3.12.x.
diff --git a/docs/mkdocs/docs/api/macros/nlohmann_json_namespace_begin.md b/docs/mkdocs/docs/api/macros/nlohmann_json_namespace_begin.md
index 1374264a3..118fba63a 100644
--- a/docs/mkdocs/docs/api/macros/nlohmann_json_namespace_begin.md
+++ b/docs/mkdocs/docs/api/macros/nlohmann_json_namespace_begin.md
@@ -21,13 +21,13 @@ The default definitions open and close the `nlohmann` namespace. The precise def
```cpp
namespace nlohmann
{
- inline namespace json_abi_v3_11_2
+ inline namespace json_abi_v3_12_0
{
```
2. Default definition of `NLOHMANN_JSON_NAMESPACE_END`:
```cpp
- } // namespace json_abi_v3_11_2
+ } // namespace json_abi_v3_12_0
} // namespace nlohmann
```
diff --git a/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum_strict.md b/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum_strict.md
index f4c52e070..7b100748b 100644
--- a/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum_strict.md
+++ b/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum_strict.md
@@ -38,7 +38,10 @@ inline void from_json(const BasicJsonType& j, type& e);
!!! important "Important notes"
- - When using [`get()`](../basic_json/get.md), undefined JSON values will throw an exception.
+ - Undefined input throws [`out_of_range.410`](../../home/exceptions.md#jsonexceptionout_of_range410) in both
+ directions: when serializing an enum value not listed in the conversions, and when deserializing (e.g., via
+ [`get()`](../basic_json/get.md)) a JSON value that matches no conversion; example:
+ `"enum value out of range for "`.
- If an enum or JSON value is specified in multiple conversions, the first matching conversion from the top of the
list will be returned when converting to or from JSON. See example 2 below.
@@ -99,4 +102,4 @@ inline void from_json(const BasicJsonType& j, type& e);
## Version history
-Added in version 3.12.0.
+Added in version 3.12.x.
diff --git a/docs/mkdocs/docs/api/operator_gtgt.md b/docs/mkdocs/docs/api/operator_gtgt.md
index f332a7517..6306c87f5 100644
--- a/docs/mkdocs/docs/api/operator_gtgt.md
+++ b/docs/mkdocs/docs/api/operator_gtgt.md
@@ -21,8 +21,6 @@ the stream `i`
## Exceptions
- Throws [`parse_error.101`](../home/exceptions.md#jsonexceptionparse_error101) in case of an unexpected token.
-- Throws [`parse_error.102`](../home/exceptions.md#jsonexceptionparse_error102) if `to_unicode` fails or surrogate error.
-- Throws [`parse_error.103`](../home/exceptions.md#jsonexceptionparse_error103) if `to_unicode` fails.
## Complexity
@@ -32,6 +30,9 @@ Linear in the length of the input. The parser is a predictive LL(1) parser.
A UTF-8 byte order mark is silently ignored.
+Invalid Unicode escapes and unpaired surrogates in the input are reported as
+[`parse_error.101`](../home/exceptions.md#jsonexceptionparse_error101) with a detailed message.
+
!!! warning "Deprecation"
This function replaces function `#!cpp std::istream& operator<<(basic_json& j, std::istream& i)` which has
@@ -61,4 +62,4 @@ A UTF-8 byte order mark is silently ignored.
## Version history
-- Added in version 1.0.0. Deprecated in version 3.0.0.
+- Added in version 1.0.0.
diff --git a/docs/mkdocs/docs/api/operator_literal_json.md b/docs/mkdocs/docs/api/operator_literal_json.md
index fdf6e8369..1ea2db568 100644
--- a/docs/mkdocs/docs/api/operator_literal_json.md
+++ b/docs/mkdocs/docs/api/operator_literal_json.md
@@ -60,4 +60,4 @@ Linear.
- Added in version 1.0.0.
- Moved to namespace `nlohmann::literals::json_literals` in 3.11.0.
-- Added `char8_t*` overload in 3.12.1.
+- Added `char8_t*` overload in 3.12.x.
diff --git a/docs/mkdocs/docs/api/operator_literal_json_pointer.md b/docs/mkdocs/docs/api/operator_literal_json_pointer.md
index 2c3d6a13a..f027df061 100644
--- a/docs/mkdocs/docs/api/operator_literal_json_pointer.md
+++ b/docs/mkdocs/docs/api/operator_literal_json_pointer.md
@@ -63,4 +63,4 @@ Linear.
- Added in version 2.0.0.
- Moved to namespace `nlohmann::literals::json_literals` in 3.11.0.
-- Added `char8_t*` overload in 3.12.1.
+- Added `char8_t*` overload in 3.12.x.
diff --git a/docs/mkdocs/docs/features/comments.md b/docs/mkdocs/docs/features/comments.md
index 6876cc508..a4c2adf19 100644
--- a/docs/mkdocs/docs/features/comments.md
+++ b/docs/mkdocs/docs/features/comments.md
@@ -27,7 +27,7 @@ For more information, see [JSON With Commas and Comments (JWCC)](https://nigelta
}
```
- When calling `parse` without additional argument, a parse error exception is thrown. If `ignore_comments` is set to `#! true`, the comments are ignored during parsing:
+ When calling `parse` without additional argument, a parse error exception is thrown. If `ignore_comments` is set to `#!cpp true`, the comments are ignored during parsing:
```cpp
--8<-- "examples/comments.cpp"
diff --git a/docs/mkdocs/docs/features/macros.md b/docs/mkdocs/docs/features/macros.md
index a600edbdb..1d169fdeb 100644
--- a/docs/mkdocs/docs/features/macros.md
+++ b/docs/mkdocs/docs/features/macros.md
@@ -9,6 +9,14 @@ This macro controls which code is executed for [runtime assertions](assertions.m
See [full documentation of `JSON_ASSERT(x)`](../api/macros/json_assert.md).
+## `JSON_BRACE_INIT_COPY_SEMANTICS`
+
+When defined to `1`, single-element brace initialization of a `basic_json` value (e.g., `#!cpp json j{value};`) is
+treated as a copy/move of the element rather than wrapping it in a single-element array. The default value is `0`, which
+preserves the existing behavior.
+
+See [full documentation of `JSON_BRACE_INIT_COPY_SEMANTICS`](../api/macros/json_brace_init_copy_semantics.md).
+
## `JSON_CATCH_USER(exception)`
This macro overrides [`#!cpp catch`](https://en.cppreference.com/w/cpp/language/try_catch) calls inside the library.
@@ -44,7 +52,7 @@ The diagnostics positions can also be controlled with the CMake option
See [full documentation of `JSON_DIAGNOSTIC_POSITIONS`](../api/macros/json_diagnostic_positions.md)
-## `JSON_HAS_CPP_11`, `JSON_HAS_CPP_14`, `JSON_HAS_CPP_17`, `JSON_HAS_CPP_20`
+## `JSON_HAS_CPP_11`, `JSON_HAS_CPP_14`, `JSON_HAS_CPP_17`, `JSON_HAS_CPP_20`, `JSON_HAS_CPP_23`, `JSON_HAS_CPP_26`
The library targets C++11, but also supports some features introduced in later C++ versions (e.g., `std::string_view`
support for C++17). For these new features, the library implements some preprocessor checks to determine the C++
@@ -52,7 +60,7 @@ standard. By defining any of these symbols, the internal check is overridden and
unconditionally assumed. This can be helpful for compilers that only implement parts of the standard and would be
detected incorrectly.
-See [full documentation of `JSON_HAS_CPP_11`, `JSON_HAS_CPP_14`, `JSON_HAS_CPP_17`, and `JSON_HAS_CPP_20`](../api/macros/json_has_cpp_11.md).
+See [full documentation of `JSON_HAS_CPP_11`, `JSON_HAS_CPP_14`, `JSON_HAS_CPP_17`, `JSON_HAS_CPP_20`, `JSON_HAS_CPP_23`, and `JSON_HAS_CPP_26`](../api/macros/json_has_cpp_11.md).
## `JSON_HAS_FILESYSTEM`, `JSON_HAS_EXPERIMENTAL_FILESYSTEM`
@@ -115,11 +123,39 @@ When defined to `0`, implicit conversions are switched off. By default, implicit
See [full documentation of `JSON_USE_IMPLICIT_CONVERSIONS`](../api/macros/json_use_implicit_conversions.md).
+## `JSON_USE_GLOBAL_UDLS`
+
+When defined to `1` (default), the user-defined string literals `operator""_json` and `operator""_json_pointer` are
+placed into the global namespace instead of `nlohmann::literals::json_literals`.
+
+See [full documentation of `JSON_USE_GLOBAL_UDLS`](../api/macros/json_use_global_udls.md).
+
+## `JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON`
+
+When defined to `1`, the library restores the legacy behavior in which a discarded value compared equal to itself. This
+behavior is deprecated and switched off (`0`) by default.
+
+See [full documentation of `JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON`](../api/macros/json_use_legacy_discarded_value_comparison.md).
+
## `NLOHMANN_DEFINE_TYPE_*(...)`, `NLOHMANN_DEFINE_DERIVED_TYPE_*(...)`
The library defines 12 macros to simplify the serialization/deserialization of types. See the page on
[arbitrary type conversion](arbitrary_types.md#simplify-your-life-with-macros) for a detailed discussion.
+## `NLOHMANN_JSON_NAMESPACE`, `NLOHMANN_JSON_NAMESPACE_BEGIN`, `NLOHMANN_JSON_NAMESPACE_END`, `NLOHMANN_JSON_NAMESPACE_NO_VERSION`
+
+These macros relate to the versioned, inline `nlohmann` namespace:
+
+- `NLOHMANN_JSON_NAMESPACE` evaluates to the full name of the `nlohmann` namespace (including the inline ABI namespace).
+- `NLOHMANN_JSON_NAMESPACE_BEGIN` / `NLOHMANN_JSON_NAMESPACE_END` open and close the namespace (for example, to add
+ specializations).
+- `NLOHMANN_JSON_NAMESPACE_NO_VERSION`, when defined to `1`, omits the version component from the inline namespace.
+
+See the [`nlohmann` Namespace](namespace.md) page, and the full documentation of
+[`NLOHMANN_JSON_NAMESPACE`](../api/macros/nlohmann_json_namespace.md),
+[`NLOHMANN_JSON_NAMESPACE_BEGIN` / `NLOHMANN_JSON_NAMESPACE_END`](../api/macros/nlohmann_json_namespace_begin.md), and
+[`NLOHMANN_JSON_NAMESPACE_NO_VERSION`](../api/macros/nlohmann_json_namespace_no_version.md).
+
## `NLOHMANN_JSON_SERIALIZE_ENUM(type, ...)`
This macro simplifies the serialization/deserialization of enum types. See
@@ -127,6 +163,9 @@ This macro simplifies the serialization/deserialization of enum types. See
See [full documentation of `NLOHMANN_JSON_SERIALIZE_ENUM`](../api/macros/nlohmann_json_serialize_enum.md).
+A strict variant [`NLOHMANN_JSON_SERIALIZE_ENUM_STRICT`](../api/macros/nlohmann_json_serialize_enum_strict.md) throws an
+exception on undefined input instead of falling back to the first mapping.
+
## `NLOHMANN_JSON_VERSION_MAJOR`, `NLOHMANN_JSON_VERSION_MINOR`, `NLOHMANN_JSON_VERSION_PATCH`
These macros are defined by the library and contain the version numbers according to
diff --git a/docs/mkdocs/docs/features/object_order.md b/docs/mkdocs/docs/features/object_order.md
index 3ee16a90e..63914188f 100644
--- a/docs/mkdocs/docs/features/object_order.md
+++ b/docs/mkdocs/docs/features/object_order.md
@@ -10,7 +10,7 @@ The default type `nlohmann::json` uses a `std::map` to store JSON objects, and t
```cpp
#include
- #include "json.hpp"
+ #include
using json = nlohmann::json;
diff --git a/docs/mkdocs/docs/features/parsing/parse_exceptions.md b/docs/mkdocs/docs/features/parsing/parse_exceptions.md
index 61c0ff290..25b4768ff 100644
--- a/docs/mkdocs/docs/features/parsing/parse_exceptions.md
+++ b/docs/mkdocs/docs/features/parsing/parse_exceptions.md
@@ -70,7 +70,7 @@ The return value indicates whether the parsing should continue, so the function
```cpp
#include
- #include "json.hpp"
+ #include
using json = nlohmann::json;
diff --git a/docs/mkdocs/docs/features/trailing_commas.md b/docs/mkdocs/docs/features/trailing_commas.md
index 583e7cbff..735ece569 100644
--- a/docs/mkdocs/docs/features/trailing_commas.md
+++ b/docs/mkdocs/docs/features/trailing_commas.md
@@ -26,7 +26,7 @@ For more information, see [JSON With Commas and Comments (JWCC)](https://nigelta
}
```
- When calling `parse` without additional argument, a parse error exception is thrown. If `ignore_trailing_commas` is set to `#! true`, the trailing commas are ignored during parsing:
+ When calling `parse` without additional argument, a parse error exception is thrown. If `ignore_trailing_commas` is set to `#!cpp true`, the trailing commas are ignored during parsing:
```cpp
--8<-- "examples/trailing_commas.cpp"
diff --git a/docs/mkdocs/docs/home/exceptions.md b/docs/mkdocs/docs/home/exceptions.md
index c949bdbf2..0996522b8 100644
--- a/docs/mkdocs/docs/home/exceptions.md
+++ b/docs/mkdocs/docs/home/exceptions.md
@@ -870,12 +870,15 @@ Key identifiers to be serialized to BSON cannot contain code point U+0000, since
### json.exception.out_of_range.410
-Undefined json fields cannot be used with [`NLOHMANN_JSON_SERIALIZE_ENUM_STRICT`](../api/macros/nlohmann_json_serialize_enum_strict.md)
+This exception is thrown when an undefined value is used with
+[`NLOHMANN_JSON_SERIALIZE_ENUM_STRICT`](../api/macros/nlohmann_json_serialize_enum_strict.md), or when an array index in
+a JSON pointer exceeds the range of `size_type` (e.g., on 32-bit platforms).
!!! failure "Example message"
```
enum value out of range
+ array index 18446744073709551616 exceeds size_type
```
## Further exceptions
diff --git a/docs/mkdocs/docs/home/releases.md b/docs/mkdocs/docs/home/releases.md
index 48230c229..cdaca4c0d 100644
--- a/docs/mkdocs/docs/home/releases.md
+++ b/docs/mkdocs/docs/home/releases.md
@@ -1,1225 +1,439 @@
# Releases
-## v3.7.3
+This page summarizes the notable changes of every release and links to the relevant documentation.
+The **complete release notes** — including all changes, the download files, and their checksums — are
+published on the [GitHub releases page](https://github.com/nlohmann/json/releases).
-!!! summary "Files"
+## v3.12.0 (2025-04-11)
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.7.3/include.zip) (274 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.7.3/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.7.3/json.hpp) (791 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.7.3/json.hpp.asc) (1 KB)
+Fixes bugs found in 3.11.3 and adds several features. All changes are backward-compatible.
-Release date: 2019-11-17
-SHA-256: 3b5d2b8f8282b80557091514d8ab97e27f9574336c804ee666fda673a9b59926 (json.hpp), 87b5884741427220d3a33df1363ae0e8b898099fbc59f1c451113f6732891014 (include.zip)
+- Adds diagnostic byte positions via [`JSON_DIAGNOSTIC_POSITIONS`](../api/macros/json_diagnostic_positions.md),
+ exposed through the new [`start_pos`](../api/basic_json/start_pos.md) and
+ [`end_pos`](../api/basic_json/end_pos.md) member functions.
+- Makes the [conversion macros](../features/arbitrary_types.md#simplify-your-life-with-macros)
+ templated (so they also work with [`ordered_json`](../api/ordered_json.md)) and adds
+ [`NLOHMANN_DEFINE_DERIVED_TYPE`](../api/macros/nlohmann_define_derived_type.md) for derived classes.
+- Adds `std::optional` support (C++17) and lets [`patch`](../api/basic_json/patch.md),
+ [`diff`](../api/basic_json/diff.md), and [`flatten`](../api/basic_json/flatten.md) work with
+ arbitrary string types.
+- Extends the [binary formats](../features/binary_formats/index.md):
+ [BJData](../features/binary_formats/bjdata.md) draft 3 and unsigned 64-bit integers for
+ [BSON](../features/binary_formats/bson.md).
+- Adds multidimensional C-array conversion and UTF-8 encoded `std::filesystem::path` conversions, and
+ lowers the minimum [CMake](../integration/cmake.md) version to allow CMake 4.0.
-### Summary
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.12.0).
-This release fixes a bug introduced in release 3.7.2 which could yield quadratic complexity in destructor calls. All changes are backward-compatible.
+## v3.11.3 (2023-11-28)
-### :bug: Bug Fixes
+Adds features and fixes bugs found in 3.11.2. All changes are backward-compatible.
-- Removed `reserve()` calls from the destructor which could lead to quadratic complexity. #1837 #1838
+- Adds a [custom base class](../api/basic_json/json_base_class_t.md) as a node customization point.
+- Adds serialization-only [conversion macros](../features/macros.md)
+ (`NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE` and `NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE`)
+ and a clearer parse error for empty input.
+- Adds [Bazel](../integration/package_managers.md#bazel) and
+ [Swift Package Manager](../integration/package_managers.md#swift-package-manager) build support.
+- Fixes custom allocators, a memory leak in [`adl_serializer`](../api/adl_serializer/to_json.md)'s
+ `to_json`, initializer-list construction when `size_type` is not `int`, and many compiler warnings.
-### :fire: Deprecated functions
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.11.3).
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+## v3.11.2 (2022-08-12)
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+Fixes bugs found in 3.11.1 and restructures the namespace. All changes are backward-compatible.
+- Fixes the [`value`](../api/basic_json/value.md) function (broken for strings, size types, and
+ `nullptr` in 3.11.0) and makes `json_fwd.hpp` self-contained.
+- Restores using [`json_pointer`](../api/json_pointer/index.md) as a key in associative containers and
+ comparing it with strings.
+- Restructures the inline [namespace](../features/namespace.md) and allows disabling the version
+ component, and avoids heap allocations in the [BJData](../features/binary_formats/bjdata.md) parser.
-## v3.7.2
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.11.2).
-!!! summary "Files"
+## v3.11.1 (2022-08-01)
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.7.2/include.zip) (274 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.7.2/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.7.2/json.hpp) (791 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.7.2/json.hpp.asc) (1 KB)
+Fixes a regression from 3.11.0. All changes are backward-compatible.
-Release date: 2019-11-10
-SHA-256: 0a65fcbbe1b334d3f45c9498e5ee28c3f3b2428aea98557da4a3ff12f0f14ad6 (json.hpp), 67f69c9a93b7fa0612dc1b6273119d2c560317333581845f358aaa68bff8f087 (include.zip)
+- Restores the global [user-defined string literals](../api/macros/json_use_global_udls.md)
+ [`operator""_json`](../api/operator_literal_json.md) and
+ [`operator""_json_pointer`](../api/operator_literal_json_pointer.md), which 3.11.0 had moved into a
+ namespace by default.
-### Summary
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.11.1).
-Project [bad_json_parsers](https://github.com/lovasoa/bad_json_parsers) tested how JSON parser libraries react on **deeply nested inputs**. It turns out that this library segfaulted at a certain nesting depth. This bug was fixed with this release. **Now the parsing is only bounded by the available memory.** All changes are backward-compatible.
+## v3.11.0 (2022-08-01)
-### :bug: Bug Fixes
+One of the largest releases ever. All changes are backward-compatible.
-* Fixed a bug that lead to stack overflow for deeply nested JSON values (objects, array) by changing the implementation of the destructor from a recursive to an iterative approach. #832, #1419, #1835
+- Allows `std::string_view` as object keys in [`at`](../api/basic_json/at.md),
+ [`operator[]`](../api/basic_json/operator%5B%5D.md), [`value`](../api/basic_json/value.md),
+ [`erase`](../api/basic_json/erase.md), [`find`](../api/basic_json/find.md),
+ [`contains`](../api/basic_json/contains.md), and [`count`](../api/basic_json/count.md).
+- Adds the [BJData](../features/binary_formats/bjdata.md) binary format (the fifth supported format).
+- Improves C++20 support, including [`operator<=>`](../api/basic_json/operator_spaceship.md) and
+ ``-compatible iterators.
+- Adds a versioned, ABI-tagged inline [namespace](../features/namespace.md)
+ ([`NLOHMANN_JSON_NAMESPACE`](../api/macros/nlohmann_json_namespace.md)) and the option to move the
+ UDLs out of the global namespace ([`JSON_USE_GLOBAL_UDLS`](../api/macros/json_use_global_udls.md)).
+- Adds [`patch_inplace`](../api/basic_json/patch_inplace.md), default values for the
+ [conversion macros](../features/arbitrary_types.md#simplify-your-life-with-macros), and an option to
+ disable enum serialization ([`JSON_DISABLE_ENUM_SERIALIZATION`](../api/macros/json_disable_enum_serialization.md)).
-### :hammer: Further Changes
+This release introduced a UDL regression that was fixed in
+[3.11.1](https://github.com/nlohmann/json/releases/tag/v3.11.1).
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.11.0).
-* Added WhiteStone Bolt. #1830
+## v3.10.5 (2022-01-03)
-### :fire: Deprecated functions
+Bug-fix release. All changes are backward-compatible.
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+- Guards the `std::filesystem` conversions behind compiler-support checks
+ ([`JSON_HAS_FILESYSTEM`](../api/macros/json_has_filesystem.md)), which can be set to `0` to disable
+ them altogether.
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.10.5).
-## v3.7.1
+## v3.10.4 (2021-10-16)
-!!! summary "Files"
+Fixes regressions introduced in 3.10.0. All changes are backward-compatible.
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.7.1/include.zip) (273 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.7.1/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.7.1/json.hpp) (789 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.7.1/json.hpp.asc) (1 KB)
+- Fixes the `std::filesystem::path` conversion (which could trigger a stack overflow and broke
+ compilation on Windows).
+- Fixes compilation for types with an explicit defaulted constructor and for code relying on the
+ return values of `std::find` and `std::remove`.
-Release date: 2019-11-06
-SHA-256: b5ba7228f3c22a882d379e93d08eab4349458ee16fbf45291347994eac7dc7ce (json.hpp), 77b9f54b34e7989e6f402afb516f7ff2830df551c3a36973085e2c7a6b1045fe (include.zip)
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.10.4).
-### Summary
+## v3.10.3 (2021-10-08)
-This release fixes several small bugs in the library. All changes are backward-compatible.
+Fixes more regressions from 3.10.0. All changes are backward-compatible.
-### :bug: Bug Fixes
+- Fixes [extended-diagnostics](../api/macros/json_diagnostics.md) assertions triggered by
+ [`update`](../api/basic_json/update.md) and by inserting into arrays.
+- Supports custom allocators when writing binary formats into a `std::vector`, and allows conversion
+ from types that only provide `begin()`/`end()`.
-- Fixed a segmentation fault when serializing `std::int64_t` minimum value. #1708 #1722
-- Fixed the [`contains()`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_ab23b04802eb9da97dc3f664e54e09cb3.html#ab23b04802eb9da97dc3f664e54e09cb3) function for JSON Pointers. #1727 #1741
-- Fixed too lax SFINAE guard for conversion from `std::pair` and `std::tuple` to `json`. #1805 #1806 #1825 #1826
-- Fixed some regressions detected by UBSAN. Updated CI to use Clang-Tidy 7.1.0. #1716 #1728
-- Fixed integer truncation in `iteration_proxy`. #1797
-- Updated [Hedley](https://github.com/nemequ/hedley) to v11 to [fix a E2512 error](https://github.com/nemequ/hedley/issues/28) in MSVC. #1799
-- Fixed a compile error in enum deserialization of non non-default-constructible types. #1647 #1821
-- Fixed the conversion from `json` to `std::valarray`.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.10.3).
-### :zap: Improvements
+## v3.10.2 (2021-08-26)
-- The [`items()`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) function can now be used with a custom string type. #1765
-- Made [`json_pointer::back`](https://nlohmann.github.io/json/classnlohmann_1_1json__pointer_a213bc67c32a30c68ac6bf06f5195d482.html#a213bc67c32a30c68ac6bf06f5195d482) `const`. #1764 #1769
-- Meson is part of the release archive. #1672 #1694
-- Improved documentation on the Meson and Spack package manager. #1694 #1720
+Re-release of 3.10.1, whose Git tag pointed at the wrong commit due to a bug in the release script.
+All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.10.2).
-### :hammer: Further Changes
+## v3.10.1 (2021-08-24)
-- Added GitHub Workflow with `ubuntu-latest`/GCC 7.4.0 as CI step.
-- Added GCC 9 to Travis CI to compile with C++20 support. #1724
-- Added MSVC 2019 to the AppVeyor CI. #1780
-- Added badge to [fuzzing status](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:json).
-- Fixed some cppcheck warnings. #1760
-- Fixed several typos in the documentation. #1720 #1767 #1803
-- Added documentation on the `JSON_THROW_USER`, `JSON_TRY_USER`, and `JSON_CATCH_USER` macros to control user-defined exception handling.
-- Used GitHub's [CODEOWNERS](https://github.com/nlohmann/json/blob/develop/.github/CODEOWNERS) and [SECURITY](https://github.com/nlohmann/json/blob/develop/.github/SECURITY.md) feature.
-- Removed `GLOB` from CMake files. #1779
-- Updated to [Doctest](https://github.com/onqtam/doctest) 2.3.5.
+Fixes a regression from 3.10.0. All changes are backward-compatible.
-### :fire: Deprecated functions
+- Fixes an [extended-diagnostics](../api/macros/json_diagnostics.md) assertion triggered when used
+ with [`ordered_json`](../api/ordered_json.md), and hardens the GDB pretty-printer.
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.10.1).
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+## v3.10.0 (2021-08-17)
-## v3.7.0
+Feature release. All changes are backward-compatible.
-!!! summary "Files"
+- Adds [extended diagnostic messages](../api/macros/json_diagnostics.md)
+ ([`JSON_DIAGNOSTICS`](../api/macros/json_diagnostics.md)) that prepend a JSON pointer to exception
+ messages to pinpoint the offending value.
+- Adds a GDB pretty-printer and a [`cbor_tag_handler_t`](../api/basic_json/cbor_tag_handler_t.md)
+ `store` option to keep CBOR tags as binary subtypes.
+- Supports containers with non-default-constructible types and parsing from `std::byte`.
+- Adds [`JSON_NO_IO`](../api/macros/json_no_io.md) to exclude the I/O headers and the
+ [`JSON_HAS_CPP_*`](../api/macros/json_has_cpp_11.md) macros to override the detected C++ standard.
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.7.0/include.zip) (143 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.7.0/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.7.0/json.hpp) (782 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.7.0/json.hpp.asc) (1 KB)
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.10.0).
-Release date: 2019-07-28
-SHA-256: a503214947952b69f0062f572cb74c17582a495767446347ce2e452963fc2ca4 (json.hpp), 541c34438fd54182e9cdc68dd20c898d766713ad6d901fb2c6e28ff1f1e7c10d (include.zip)
+## v3.9.1 (2020-08-06)
-### Summary
+Fixes two regressions from 3.9.0. All changes are backward-compatible.
-This release introduces a few convenience functions and performs a lot of house keeping (bug fixes and small improvements). All changes are backward-compatible.
+- Accepts consecutive [comments](../features/comments.md) and completes the
+ [`ordered_json`](../api/ordered_json.md) interface (e.g. `ordered_json::parse`).
-### :sparkles: New Features
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.9.1).
-- Add overload of the **[`contains`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab23b04802eb9da97dc3f664e54e09cb3.html#ab23b04802eb9da97dc3f664e54e09cb3) function** to check if a JSON pointer is valid without throwing exceptions, just like its [counterpart for object keys](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9286acdc0578fc66e9346323e69fc0e3.html#a9286acdc0578fc66e9346323e69fc0e3). #1600
-- Add a function **[`to_string`](http://nlohmann.github.io/json/doxygen/namespacenlohmann_a6ce645a0b8717757e096a5b5773b7a16.html#a6ce645a0b8717757e096a5b5773b7a16)** to allow for generic conversion to strings. #916 #1585
-- Add **return value for the [`emplace_back`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_abf29131f898b05aad2c01a9c80e7a002.html#abf29131f898b05aad2c01a9c80e7a002) function**, returning a reference to the added element just like C++17 is [introducing this](https://en.cppreference.com/w/cpp/container/vector/emplace_back) for `std::vector`. #1609
-- Add info how to use the library with the **[pacman](https://wiki.archlinux.org/index.php/pacman) package manager** on MSYS2. #1670
+## v3.9.0 (2020-07-27)
-### :bug: Bug Fixes
+Feature release adding four long-requested features. All changes are backward-compatible.
-- Fix an issue where typedefs with certain names yielded a compilation error. #1642 #1643
-- Fix a conversion to `std::string_view` in the unit tests. #1634 #1639
-- Fix MSVC Debug build. #1536 #1570 #1608
-- Fix [`get_to`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a65753c68f06639eda0d355f919564e01.html#a65753c68f06639eda0d355f919564e01) method to clear existing content before writing. #1511 #1555
-- Fix a `-Wc++17-extensions` warning. `nodiscard` attributes are now only used with Clang when `-std=c++17` is used. #1535 #1551
+- Optional [comment](../features/comments.md) parsing in [`parse`](../api/basic_json/parse.md) via the
+ `ignore_comments` parameter.
+- [`ordered_json`](../api/ordered_json.md) to preserve the [insertion order](../features/object_order.md)
+ of object keys.
+- An option to switch off [implicit conversions](../api/macros/json_use_implicit_conversions.md).
+- The [`NLOHMANN_DEFINE_TYPE_*`](../features/arbitrary_types.md#simplify-your-life-with-macros)
+ convenience macros, plus high-precision-number support for
+ [UBJSON](../features/binary_formats/ubjson.md) and CBOR tag handling.
-### :zap: Improvements
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.9.0).
-- Switch from [Catch](https://github.com/philsquared/Catch) to **[doctest](https://github.com/onqtam/doctest)** for the unit tests which speeds up compilation and runtime of the 112,112,308 tests.
-- Add an explicit section to the [README](https://github.com/nlohmann/json/blob/develop/README.md) about the **frequently addressed topics** [character encoding](https://github.com/nlohmann/json#character-encoding), [comments in JSON](https://github.com/nlohmann/json#comments-in-json), and the [order of object keys](https://github.com/nlohmann/json#order-of-object-keys).
+## v3.8.0 (2020-06-14)
-### :hammer: Further Changes
+Feature release. All changes are backward-compatible.
-- Use [`GNUInstallDirs`](https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html) to set library install directories. #1673
-- Fix links in the [README](https://github.com/nlohmann/json/blob/develop/README.md). #1620 #1621 #1622 #1623 #1625
-- Mention [`json` type](http://nlohmann.github.io/json/doxygen/namespacenlohmann_a2bfd99e845a2e5cd90aeaf1b1431f474.html#a2bfd99e845a2e5cd90aeaf1b1431f474) on the [documentation start page](http://nlohmann.github.io/json/doxygen/index.html). #1616
-- Complete documentation of [`value()` function](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_adcf8ca5079f5db993820bf50036bf45d.html#adcf8ca5079f5db993820bf50036bf45d) with respect to `type_error.302` exception. #1601
-- Fix links in the documentation. #1598
-- Add regression tests for MSVC. #1543 #1570
-- Use **[CircleCI](http://circleci.com)** for [continuous integration](https://circleci.com/gh/nlohmann/json).
-- Use **[Doozer](https://doozer.io)** for [continuous integration](https://doozer.io/nlohmann/json) on Linux (CentOS, Raspbian, Fedora)
-- Add tests to check each CMake flag (`JSON_BuildTests`, `JSON_Install`, `JSON_MultipleHeaders`, `JSON_Sanitizer`, `JSON_Valgrind`, `JSON_NoExceptions`, `JSON_Coverage`).
-- Use [Hedley](https://nemequ.github.io/hedley/) to avoid re-inventing several compiler-agnostic feature macros like `JSON_DEPRECATED`, `JSON_NODISCARD`, `JSON_LIKELY`, `JSON_UNLIKELY`, `JSON_HAS_CPP_14`, or `JSON_HAS_CPP_17`. Functions taking or returning pointers are annotated accordingly when a pointer will not be null.
-- Build and run tests on [AppVeyor](https://ci.appveyor.com/project/nlohmann/json) in DEBUG and RELEASE mode.
+- Introduces a [binary value](../features/binary_values.md) type that is read from and written to
+ [CBOR](../features/binary_formats/cbor.md), [BSON](../features/binary_formats/bson.md), and
+ [MessagePack](../features/binary_formats/messagepack.md), and can be shared between formats.
+- Generalizes the input adapters to read from any `LegacyInputIterator` container (3–10 % faster
+ parsing).
+- Fixes [`contains`](../api/basic_json/contains.md) for JSON pointers and makes the binary
+ [`from_cbor`](../api/basic_json/from_cbor.md)/[`from_msgpack`](../api/basic_json/from_msgpack.md)/etc.
+ functions respect `allow_exceptions`.
-### :fire: Deprecated functions
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.8.0).
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+## v3.7.3 (2019-11-17)
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+Fixes a regression from 3.7.2 that could yield quadratic complexity in destructor calls. All changes
+are backward-compatible. [Full release notes](https://github.com/nlohmann/json/releases/tag/v3.7.3).
-## v3.6.1
+## v3.7.2 (2019-11-10)
-!!! summary "Files"
+Fixes a stack overflow for deeply nested input by making the destructor iterative; parsing is now
+bounded only by available memory. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.7.2).
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip) (136 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.6.1/json.hpp) (711 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.6.1/json.hpp.asc) (1 KB)
+## v3.7.1 (2019-11-06)
-Release date: 2019-03-20
-SHA-256: d2eeb25d2e95bffeb08ebb7704cdffd2e8fca7113eba9a0b38d60a5c391ea09a (json.hpp), 69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf (include.zip)
+Bug-fix release. All changes are backward-compatible.
-### Summary
+- Fixes a segmentation fault when serializing the `std::int64_t` minimum value and fixes
+ [`contains`](../api/basic_json/contains.md) for JSON pointers.
+- Allows [`items`](../api/basic_json/items.md) with a custom string type and makes `json_pointer::back`
+ `const`.
-This release **fixes a regression and a bug** introduced by the earlier 3.6.0 release. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.7.1).
-### :bug: Bug Fixes
+## v3.7.0 (2019-07-28)
-- Fixed regression of #590 which could lead to compilation errors with GCC 7 and GCC 8. #1530
-- Fixed a compilation error when `` was included. #1531
+Convenience features and house-keeping. All changes are backward-compatible.
-### :hammer: Further Changes
+- Adds a [`contains`](../api/basic_json/contains.md) overload that checks a JSON pointer without
+ throwing, a generic `to_string`, and a return value for
+ [`emplace_back`](../api/basic_json/emplace_back.md).
-- Fixed a warning for missing field initializers. #1527
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.7.0).
-### :fire: Deprecated functions
+## v3.6.1 (2019-03-20)
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+Fixes a regression (GCC 7/8 compilation) and a `` build error introduced in 3.6.0. All
+changes are backward-compatible. [Full release notes](https://github.com/nlohmann/json/releases/tag/v3.6.1).
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+## v3.6.0 (2019-03-20)
-## v3.6.0
+Feature release. All changes are backward-compatible.
-!!! summary "Files"
+- Reworks the [JSON pointer](../features/json_pointer.md) interface (`operator/`, `push_back`,
+ `parent_pointer`, …).
+- Adds a [`contains`](../api/basic_json/contains.md) function to test for an object key and greatly
+ improves the performance of integer serialization.
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.6.0/include.zip) (136 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.6.0/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.6.0/json.hpp) (711 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.6.0/json.hpp.asc) (1 KB)
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.6.0).
-Release date: 2019-03-20
-SHA-256: ce9839370f28094c71107c405affb3b08c4a098154988014cbb0800b1c44a831 (json.hpp), 237c5e66e7f8186a02804ce9dbd5f69ce89fe7424ef84adf6142e973bd9532f4 (include.zip)
+## v3.5.0 (2018-12-22)
-ℹ️ **This release introduced a regression. Please update to [version 3.6.1](https://github.com/nlohmann/json/releases/tag/v3.6.1)!**
+Feature release. All changes are backward-compatible.
-### Summary
+- Adds structured-binding support via the [`items`](../api/basic_json/items.md) function and reading
+ from `FILE*` in the [`parse`](../api/basic_json/parse.md) function.
+- Fixes the `eofbit` handling on input streams and a bug in the BSON SAX parser.
-This release adds some **convenience functions for JSON Pointers**, introduces a [`contains`](
-http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a0a45fc740637123fdf05fef970f8be47.html#a0a45fc740637123fdf05fef970f8be47) function to check if a key is present in an object, and improves the **performance of integer serialization**. Furthermore, a lot of small bug fixes and improvements have been made. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.5.0).
-### :sparkles: New Features
+## v3.4.0 (2018-10-30)
-- Overworked the public interface for JSON Pointers. The creation of JSON Pointers is simplified with [`operator/`](
-http://nlohmann.github.io/json/doxygen/classnlohmann_1_1json__pointer_a90a11fe6c7f37b1746a3ff9cb24b0d53.html#a90a11fe6c7f37b1746a3ff9cb24b0d53) and [`operator/=`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1json__pointer_a7395bd0af29ac23fd3f21543c935cdfa.html#a7395bd0af29ac23fd3f21543c935cdfa). JSON Pointers can be inspected with [`empty`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1json__pointer_a649252bda4a2e75a0915b11a25d8bcc3.html#a649252bda4a2e75a0915b11a25d8bcc3), [`back`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1json__pointer_a6bd5b554c10f15672135c216893eef31.html#a6bd5b554c10f15672135c216893eef31), and [`parent_pointer`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1json__pointer_afdaacce1edb7145e0434e014f0e8685a.html#afdaacce1edb7145e0434e014f0e8685a), and manipulated with [`push_back`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1json__pointer_a697d12b5bd6205f8866691b166b7c7dc.html#a697d12b5bd6205f8866691b166b7c7dc) and [`pop_back`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1json__pointer_a4b1ee4d511ca195bed896a3da47e264c.html#a4b1ee4d511ca195bed896a3da47e264c). #1434
-- Added a boolean method [`contains`](
-http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a0a45fc740637123fdf05fef970f8be47.html#a0a45fc740637123fdf05fef970f8be47) to check whether an element exists in a JSON object with a given key. Returns false when called on non-object types. #1471 #1474
+Feature release. All changes are backward-compatible.
-### :bug: Bug Fixes
+- Adds [BSON](../features/binary_formats/bson.md) read/write support.
+- Adds configurable Unicode error handlers to [`dump`](../api/basic_json/dump.md) (throw, replace with
+ U+FFFD, or ignore) and the
+ [`NLOHMANN_JSON_SERIALIZE_ENUM`](../api/macros/nlohmann_json_serialize_enum.md) macro for
+ [enum conversion](../features/enum_conversion.md).
+- Improves parse-error messages with line/column positions and context.
-- Fixed a compilation issues with libc 2.12. #1483 #1514
-- Fixed endian conversion on PPC64. #1489
-- Fixed library to compile with GCC 9. #1472 #1492
-- Fixed a compilation issue with GCC 7 on CentOS. #1496
-- Fixed an integer overflow. #1447
-- Fixed buffer flushing in serializer. #1445 #1446
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.4.0).
-### :zap: Improvements
+## v3.3.0 (2018-10-05)
-- The performance of dumping integers has been greatly improved. #1411
-- Added CMake parameter `JSON_Install` to control whether the library should be installed (default: on). #1330
-- Fixed a lot of compiler and linter warnings. #1400 #1435 #1502
-- Reduced required CMake version from 3.8 to 3.1. #1409 #1428 #1441 #1498
-- Added `nodiscard` attribute to `meta()`, `array()`, `object()`, `from_cbor`, `from_msgpack`, `from_ubjson`, `from_bson`, and `parse`. #1433
+Feature release. All changes are backward-compatible.
-### :hammer: Further Changes
+- Adds GCC 4.8 support, the [`get_to`](../api/basic_json/get_to.md) function, and an overhauled and
+ documented [CMake](../integration/cmake.md) integration.
-- Added missing headers. #1500
-- Fixed typos and broken links in README. #1417 #1423 #1425 #1451 #1455 #1491
-- Fixed documentation of parse function. #1473
-- Suppressed warning that cannot be fixed inside the library. #1401 #1468
-- Improved package manager suppert:
- - Updated Buckaroo instructions. #1495
- - Improved Meson support. #1463
- - Added Conda package manager documentation. #1430
- - Added NuGet package manager documentation. #1132
-- Continuous Integration
- - Removed unstable or deprecated Travis builders (Xcode 6.4 - 8.2) and added Xcode 10.1 builder.
- - Added Clang 7 to Travis CI.
- - Fixed AppVeyor x64 builds. #1374 #1414
-- Updated thirdparty libraries:
- - Catch 1.12.0 -> 1.12.2
- - Google Benchmark 1.3.0 -> 1.4.1
- - Doxygen 1.8.15 -> 1.8.16
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.3.0).
-### :fire: Deprecated functions
+## v3.2.0 (2018-08-20)
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+Feature release. All changes are backward-compatible.
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+- Adds a [SAX interface](../features/parsing/sax_interface.md) and a non-recursive parser.
+- Adds parsing from wide-string types (`std::wstring`, `std::u16string`, `std::u32string`) and
+ `std::string_view` (C++17), and round-tripping of `std::map`/`std::unordered_map` with non-string
+ keys.
-## v3.5.0
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.2.0).
-!!! summary "Files"
+## v3.1.2 (2018-03-14)
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.5.0/include.zip) (133 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.5.0/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.5.0/json.hpp) (693 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.5.0/json.hpp.asc) (1 KB)
+Bug-fix release. All changes are backward-compatible.
-Release date: 2018-12-22
-SHA-256: 8a6dbf3bf01156f438d0ca7e78c2971bca50eec4ca6f0cf59adf3464c43bb9d5 (json.hpp), 3564da9c5b0cf2e032f97c69baedf10ddbc98030c337d0327a215ea72259ea21 (include.zip)
+- Fixes a memory leak in the parser callback and adds user-defined string-type support to the parser
+ and serializer.
-### Summary
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.1.2).
-This release introduces the support for **structured bindings** and reading from **`FILE*`**. Besides, a few bugs have been fixed. All changes are backward-compatible.
+## v3.1.1 (2018-02-13)
-### :sparkles: New Features
+Bug-fix release. All changes are backward-compatible.
-- **Structured bindings** are now supported for JSON objects and arrays via the [`items()`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) member function, so finally this code is possible:
- ```cpp
- for (auto& [key, val] : j.items()) {
- std::cout << key << ':' << val << '\n';
- }
- ```
- #1388 #1391
+- Fixes parsing of indefinite-length CBOR strings, a user-defined conversion to vector types, and
+ overflow detection for UBJSON containers.
-- Added support for **reading from `FILE*`** to support situations in which streams are nit available or would require too much RAM. #1370 #1392
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.1.1).
-### :bug: Bug Fixes
+## v3.1.0 (2018-02-01)
-- The `eofbit` was not set for input streams when the end of a stream was reached while parsing. #1340 #1343
-- Fixed a bug in the SAX parser for BSON arrays.
+Feature release. All changes are backward-compatible.
-### :zap: Improvements
+- Adds [UBJSON](../features/binary_formats/ubjson.md) read/write support and
+ [JSON Merge Patch](../features/merge_patch.md) via [`merge_patch`](../api/basic_json/merge_patch.md).
+- Switches to the Grisu2 algorithm for short, round-trippable floating-point output, and splits the
+ header into [multiple files](../integration/index.md) with a forward-declaration header.
-- Added support for Clang 5.0.1 (PS4 version). #1341 #1342
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.1.0).
-### :hammer: Further Changes
+## v3.0.1 (2017-12-29)
-- Added a warning for implicit conversions to the documentation: It is not recommended to use implicit conversions when reading **from** a JSON value. Details about this recommendation can be found [here](https://www.github.com/nlohmann/json/issues/958). #1363
-- Fixed typos in the documentation. #1329 #1380 #1382
-- Fixed a C4800 warning. #1364
-- Fixed a `-Wshadow` warning #1346
-- Wrapped `std::snprintf` calls to avoid error in MSVC. #1337
-- Added code to allow installation via Meson. #1345
+Fixes small issues in the [JSON Pointer](../features/json_pointer.md) and
+[JSON Patch](../features/json_patch.md) implementations (invalid "copy" targets and non-integer array
+indices). All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.0.1).
-### :fire: Deprecated functions
+## v3.0.0 (2017-12-17)
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+First 3.x release — a major release with breaking changes (see the
+[migration guide](../integration/migration_guide.md)).
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+- Introduces user-defined [exceptions](exceptions.md) (`json::exception` and subtypes, each with an
+ identifier).
+- Adds a non-throwing [`accept`](../api/basic_json/accept.md) function and an `allow_exceptions` flag
+ for [`parse`](../api/basic_json/parse.md), and an [`update`](../api/basic_json/update.md) function to
+ merge objects.
+- Adds streaming for CBOR and MessagePack and allows storing NaN/infinity.
+- Non-UTF-8 strings now throw on serialization, and the iterator category changed to bidirectional.
-## v3.4.0
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v3.0.0).
-!!! summary "Files"
+## v2.1.1 (2017-02-25)
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip) (132 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp) (689 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp.asc) (1 KB)
+Bug-fix release. All changes are backward-compatible.
-Release date: 2018-10-30
-SHA-256: 63da6d1f22b2a7bb9e4ff7d6b255cf691a161ff49532dcc45d398a53e295835f (json.hpp), bfec46fc0cee01c509cf064d2254517e7fa80d1e7647fea37cf81d97c5682bdc (include.zip)
+- Makes number parsing and serialization locale-independent with correct floating-point
+ round-tripping; released files are now GPG-signed.
-### Summary
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.1.1).
-This release introduces three new features:
+## v2.1.0 (2017-01-28)
-- **BSON (Binary JSON)** is next to CBOR, MessagePack, and UBJSON the fourth binary (de)serialization format supported by the library.
-- **Adjustable error handlers for invalid Unicode** allows to specify the behavior when invalid byte sequences are serialized.
-- **Simplified enum/JSON mapping** with a macro in case the default mapping to integers is not desired.
+Feature release. All changes are backward-compatible.
-Furthermore, some effort has been invested in improving the **parse error messages**. Besides, a few bugs have been fixed. All changes are backward-compatible.
+- Adds conversions from and to [arbitrary user-defined types](../features/arbitrary_types.md) via
+ `to_json`/`from_json`, the [`meta`](../api/basic_json/meta.md) function, and the option to switch off
+ exceptions ([`JSON_NOEXCEPTION`](../api/macros/json_noexception.md)).
-### :sparkles: New Features
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.1.0).
-- The library can read and write a subset of **[BSON](http://bsonspec.org/) (Binary JSON)**. All data types known from JSON are supported, whereas other types more tied to MongoDB such as timestamps, object ids, or binary data are currently not implemented. See [the README](https://github.com/nlohmann/json#binary-formats-bson-cbor-messagepack-and-ubjson) for examples. #1244 #1320
-- The behavior when the library encounters an invalid Unicode sequence during serialization can now be controlled by defining one of three **Unicode error handlers**: (1) throw an exception (default behavior), (2) replace invalid sequences by the Unicode replacement character (U+FFFD), or (3) ignore/filter invalid sequences. See the [documentation of the `dump` function](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a50ec80b02d0f3f51130d4abb5d1cfdc5.html#a50ec80b02d0f3f51130d4abb5d1cfdc5) for examples. #1198 #1314
-- To easily specify a user-defined **enum/JSON mapping**, a macro `NLOHMANN_JSON_SERIALIZE_ENUM` has been introduced. See the [README section](https://github.com/nlohmann/json#specializing-enum-conversion) for more information. #1208 #1323
+## v2.0.10 (2017-01-02)
-### :bug: Bug Fixes
+Fixes several security-relevant bugs in the CBOR and MessagePack parsers found by OSS-Fuzz. All
+changes are backward-compatible. [Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.10).
-- fixed truncation #1286 #1315
-- fixed an issue with std::pair #1299 #1301
-- fixed an issue with std::variant #1292 #1294
-- fixed a bug in the JSON Pointer parser
+## v2.0.9 (2016-12-16)
-### :zap: Improvements
+Adds the [CBOR](../features/binary_formats/cbor.md) and
+[MessagePack](../features/binary_formats/messagepack.md) binary formats. All changes are
+backward-compatible. [Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.9).
-- The **diagnosis messages for parse errors** have been improved: error messages now indicated line/column positions where possible (in addition to a byte count) and also the context in which the error occurred (e.g., "while parsing a JSON string"). Example: error `parse error at 2: syntax error - invalid string: control character must be escaped; last read: ''` is now reported as `parse error at line 1, column 2: syntax error while parsing value - invalid string: control character U+0009 (HT) must be escaped to \u0009 or \t; last read: ''`. #1280 #1288 #1303
+## v2.0.8 (2016-12-02)
-### :hammer: Further Changes
+Adds the [`emplace`](../api/basic_json/emplace.md) and
+[`emplace_back`](../api/basic_json/emplace_back.md) functions and improves parsing and serialization
+performance. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.8).
-- improved Meson documentation #1305
-- fixed some more linter warnings #1280
-- fixed Clang detection for third-party Google Benchmark library #1277
+## v2.0.7 (2016-11-02)
-### :fire: Deprecated functions
+Fixes several parser bugs found through the "Parsing JSON is a Minefield" study (short files, encoding
+detection, surrogate pairs). All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.7).
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+## v2.0.6 (2016-10-15)
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+Fixes [`operator[]`](../api/basic_json/operator%5B%5D.md) for [JSON pointers](../features/json_pointer.md)
+so that it creates missing values like the other overloads. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.6).
-## v3.3.0
+## v2.0.5 (2016-09-14)
-!!! summary "Files"
+Fixes a remaining stream end-of-file detection bug in the parser. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.5).
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.3.0/include.zip) (123 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.3.0/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.3.0/json.hpp) (635 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.3.0/json.hpp.asc) (1 KB)
+## v2.0.4 (2016-09-11)
-Release date: 2018-10-05
-SHA-256: f1327bb60c58757a3dd2b0c9c45d49503d571337681d950ec621f8374bcc14d4 (json.hpp), 9588d63557333aaa485e92221ec38014a85a6134e7486fe3441e0541a5a89576 (include.zip)
+Fixes stream end-of-file detection in the parser. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.4).
-### Summary
+## v2.0.3 (2016-08-31)
-This release adds support for **GCC 4.8**. Furthermore, it adds a function [**`get_to`**](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a8a3db7d78f74232d3a6fb8f1abf69709.html#a8a3db7d78f74232d3a6fb8f1abf69709) to write a JSON value to a passed reference. Another topic of this release was the **CMake support** which has been overworked and documented.
+Generalizes the parser to accept any contiguous sequence of one-byte elements and deprecates the
+input-stream constructor in favor of the [`parse`](../api/basic_json/parse.md) function. All changes
+are backward-compatible. [Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.3).
-Besides, a lot of bugs have been fixed and slight improvements have been made. All changes are backward-compatible.
+## v2.0.2 (2016-07-31)
-### :sparkles: New Features
+Overhauls the parser (now rejecting unescaped control characters), tightens the class invariants, and
+cleans up the code. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.2).
-- The library can now also built with **GCC 4.8**. Though this compiler does not fully support C++11, it can successfully compile and run the test suite. Note that bug [57824](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57824) in GCC 4.8 still forbids to use multiline raw strings in arguments to macros. #1257
-- Added new function [**`get_to`**](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a8a3db7d78f74232d3a6fb8f1abf69709.html#a8a3db7d78f74232d3a6fb8f1abf69709) to write a JSON value to a passed reference. The destination type is automatically derived which allows more succinct code compared to the `get` function. #1227 #1231
+## v2.0.1 (2016-06-28)
-### :bug: Bug Fixes
+Fixes a performance regression in the [`dump`](../api/basic_json/dump.md) function by adjusting the
+stream locale once per serialization. All changes are backward-compatible.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.1).
-- Fixed a bug in the CMake file that made `target_link_libraries` to not properly include `nlohmann_json`. #1243 #1245 #1260
-- Fixed a warning in MSVC 2017 complaining about a constexpr if. #1204 #1268 #1272
-- Fixed a bug that prevented compilation with ICPC. #755 #1222
-- Improved the SFINAE correctness to fix a bug in the conversion operator. #1237 #1238
-- Fixed a `-Wctor-dtor-privacy` warning. #1224
-- Fixed a warning on a lambda in unevaluated context. #1225 #1230
-- Fixed a bug introduced in version 3.2.0 where defining `JSON_CATCH_USER` led to duplicate macro definition of `JSON_INTERNAL_CATCH`. #1213 #1214
-- Fixed a bug that prevented compilation with Clang 3.4.2 in RHEL 7. #1179 #1249
+## v2.0.0 (2016-06-24)
-### :zap: Improvements
+Feature release with a minor (potentially non-backward-compatible) API change from added `noexcept`
+and `constexpr` specifiers.
-- Added [documentation on CMake integration](https://github.com/nlohmann/json#cmake) of the library. #1270
-- Changed the CMake file to use `find_package(nlohmann_json)` without installing the library. #1202
-- Improved error messages in case `operator[]` is used with the wrong combination (json.exception.type_error.305) of JSON container type and argument type. Example: "cannot use operator[] with a string argument". #1220 #1221
-- Added a license and version information to the Meson build file. #1252
-- Removed static assertions to indicated missing `to_json` or `from_json` functions as such assertions do not play well with SFINAE. These assertions also led to problems with GMock. #960 #1212 #1228
-- The test suite now does not wait forever if run in a wrong directory and input files are not found. #1262
-- The test suite does not show deprecation warnings for deprecated functions which frequently led to confusion. #1271
+- Adds [JSON Pointer](../features/json_pointer.md) support in [`at`](../api/basic_json/at.md) and
+ [`operator[]`](../api/basic_json/operator%5B%5D.md), plus [`flatten`](../api/basic_json/flatten.md)
+ and [`unflatten`](../api/basic_json/unflatten.md).
+- Adds [JSON Patch](../features/json_patch.md) via [`diff`](../api/basic_json/diff.md) and
+ [`patch`](../api/basic_json/patch.md), unsigned 64-bit integer support, and locale-independent
+ serialization.
-### :hammer: Further Changes
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v2.0.0).
-- GCC 4.8 and Xcode 10 were added to the [continuous integration suite](https://travis-ci.org/nlohmann/json) at Travis.
-- Added [lgtm](https://lgtm.com/projects/g/nlohmann/json/context:cpp) checks to pull requests.
-- Added tests for CMake integration. #1260
+## v1.1.0 (2016-01-24)
-### :fire: Deprecated functions
+Bug-fix and feature release. All changes are backward-compatible.
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
+- Improves floating-point round-tripping, adds a `get_ref` accessor for stored values, and introduces
+ runtime [assertions](../features/assertions.md).
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
+[Full release notes](https://github.com/nlohmann/json/releases/tag/v1.1.0).
+## v1.0.0 (2015-12-28)
-## v3.2.0
+First official release. [Full release notes](https://github.com/nlohmann/json/releases/tag/v1.0.0).
-!!! summary "Files"
+## See also
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.2.0/include.zip) (124 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.2.0/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp) (636 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp.asc) (1 KB)
-
-Release date: 2018-08-20
-SHA-256: ce6b5610a051ec6795fa11c33854abebb086f0fd67c311f5921c3c07f9531b44 (json.hpp), 35ee642558b90e2f9bc758995c4788c4b4d4dec54eef95fb8f38cb4d49c8fc7c (include.zip)
-
-### Summary
-
-This release introduces a [**SAX interface**](https://nlohmann.github.io/json/structnlohmann_1_1json__sax.html) to the library. While this may be a very special feature used by only few people, it allowed to unify all functions that consumed input and created some kind of JSON value. Internally, now all existing functions like `parse`, `accept`, `from_cbor`, `from_msgpack`, and `from_ubjson` use the SAX interface with different event processors. This allowed to separate the input processing from the value generation. Furthermore, throwing an exception in case of a parse error is now optional and up to the event processor. Finally, the JSON parser is now non-recursive (meaning it does not use the call stack, but `std::vector` to track the hierarchy of structured values) which allows to process nested input more efficiently.
-
-Furthermore, the library finally is able to parse from **wide string types**. This is the first step toward opening the library from UTF-8 to UTF-16 and UTF-32.
-
-This release further fixes several bugs in the library. All changes are backward-compatible.
-
-### :sparkles: New Features
-
-- added a parser with a **SAX interface** (#971, #1153)
-- support to parse from **wide string types** `std::wstring`, `std::u16string`, and `std::u32string`; the input will be converted to UTF-8 (#1031)
-- added support for **`std::string_view`** when using C++17 (#1028)
-- allow to **roundtrip `std::map` and `std::unordered_map`** from JSON if key type is not convertible to string; in these cases, values are serialized to arrays of pairs (#1079, #1089, #1133, #1138)
-
-### :bug: Bug Fixes
-
-- allow to create `nullptr_t` from JSON allowing to properly roundtrip `null` values (#1169)
-- allow compare user-defined string types (#1130)
-- better support for algorithms using iterators from `items()` (#1045, #1134)
-- added parameter to avoid compilation error with MSVC 2015 debug builds (#1114)
-- re-added accidentally skipped unit tests (#1176)
-- fixed MSVC issue with `std::swap` (#1168)
-
-### :zap: Improvements
-
-- `key()` function for iterators returns a const reference rather than a string copy (#1098)
-- binary formats CBOR, MessagePack, and UBJSON now supports `float` as type for floating-point numbers (#1021)
-
-### :hammer: Further Changes
-
-- changed issue templates
-- improved continuous integration: added builders for Xcode 9.3 and 9.4, added builders for GCC 8 and Clang 6, added builder for MinGW, added builders for MSVC targeting x86
-- required CMake version is now at least 3.8 (#1040)
-- overworked CMake file wrt. packaging (#1048)
-- added package managers: Spack (#1041) and CocoaPods (#1148)
-- fixed Meson include directory (#1142)
-- preprocessor macro `JSON_SKIP_UNSUPPORTED_COMPILER_CHECK` can skip the rejection of unsupported compilers - use at your own risk! (#1128)
-- preprocessor macro `JSON_INTERNAL_CATCH`/`JSON_INTERNAL_CATCH_USER` allows to control the behavior of exception handling inside the library (#1187)
-- added note on `char` to JSON conversion
-- added note how to send security-related issue via encrypted email
-- removed dependency to `std::stringstream` (#1117)
-- added SPDX-License-Identifier
-- added updated JSON Parsing Test Suite, described in [Parsing JSON is a Minefield 💣](http://seriot.ch/parsing_json.php)
-- updated to Catch 1.12.0
-
-### :fire: Deprecated functions
-
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
-
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
-
-
-
-## v3.1.2
-
-!!! summary "Files"
-
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.1.2/include.zip) (115 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.1.2/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.1.2/json.hpp) (582 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.1.2/json.hpp.asc) (1 KB)
-
-Release date: 2018-03-14
-SHA-256: fbdfec4b4cf63b3b565d09f87e6c3c183bdd45c5be1864d3fcb338f6f02c1733 (json.hpp), 495362ee1b9d03d9526ba9ccf1b4a9c37691abe3a642ddbced13e5778c16660c (include.zip)
-
-### Summary
-
-This release fixes several bugs in the library. All changes are backward-compatible.
-
-### :bug: Bug Fixes
-
-- Fixed a **memory leak** occurring in the parser callback (#1001).
-- Different **specializations of `basic_json`** (e.g., using different template arguments for strings or objects) can now be used in assignments (#972, #977, #986).
-- Fixed a logical error in an iterator range check (#992).
-
-### :zap: Improvements
-
-- The parser and the serialization now support **user-defined string types** (#1006, #1009).
-
-### :hammer: Further Changes
-
-- **[Clang Analyzer](http://clang-analyzer.llvm.org)** is now used as additional static analyzer; see `make clang_analyze`.
-- Overworked [README](https://github.com/nlohmann/json/blob/develop/README.md) by adding links to the [documentation](https://nlohmann.github.io/json/) (#981).
-
-### :fire: Deprecated functions
-
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
-
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
-
-
-## v3.1.1
-
-!!! summary "Files"
-
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.1.1/include.zip) (114 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.1.1/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.1.1/json.hpp) (577 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.1.1/json.hpp.asc) (1 KB)
-
-Release date: 2018-02-13
-SHA-256: e14ce5e33d6a2daf748026bd4947f3d9686ca4cfd53d10c3da46a0a9aceb7f2e (json.hpp), fde771d4b9e4f222965c00758a2bdd627d04fb7b59e09b7f3d1965abdc848505 (include.zip)
-
-### Summary
-
-This release fixes several bugs in the library. All changes are backward-compatible.
-
-### :bug: Bug Fixes
-
-- Fixed parsing of **CBOR strings with indefinite length** (#961). Earlier versions of this library misinterpreted the CBOR standard and rejected input with the `0x7F` start byte.
-- Fixed user-defined **conversion to vector type** (#924, #969). A wrong SFINAE check rejected code though a user-defined conversion was provided.
-- Fixed documentation of the parser behavior for **objects with duplicate keys** (#963). The exact behavior is not specified by [RFC 8259](https://tools.ietf.org/html/rfc8259) and the library now also provides no guarantee which object key is stored.
-- Added check to detect memory **overflow when parsing UBJSON containers** (#962). The optimized UBJSON format allowed for specifying an array with billions of `null` elements with a few bytes and the library did not check whether this size exceeded `max_size()`.
-
-### :hammer: Further Changes
-
-- [Code coverage](https://coveralls.io/github/nlohmann/json) is now calculated for the individual header files, allowing to find uncovered lines more quickly than by browsing through the single header version (#953, #957).
-- A Makefile target `run_benchmarks` was added to quickly build and run the benchmark suite.
-- The documentation was harmonized with respect to the header inclusion (#955). Now all examples and the README use `#include ` to allow for selecting `single_include` or `include` or whatever installation folder as include directory.
-- Added note on how to use the library with the [cget](http://cget.readthedocs.io/en/latest/) package manager (#954).
-
-### :fire: Deprecated functions
-
-This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
-
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) are deprecated. Please use the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) instead.
-- Functions [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3) and [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983) are deprecated. Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
-
-## v3.1.0
-
-!!! summary "Files"
-
- - [include.zip](https://github.com/nlohmann/json/releases/download/v3.1.0/include.zip) (114 KB)
- - [include.zip.asc](https://github.com/nlohmann/json/releases/download/v3.1.0/include.zip.asc) (1 KB)
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.1.0/json.hpp) (577 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.1.0/json.hpp.asc) (1 KB)
-
-Release date: 2018-02-01
-SHA-256: d40f614d10a6e4e4e80dca9463da905285f20e93116c36d97d4dc1aa63d10ba4 (json.hpp), 2b7234fca394d1e27b7e017117ed80b7518fafbb4f4c13a7c069624f6f924673 (include.zip)
-
-### Summary
-
-This release adds support for the [**UBJSON**](http://ubjson.org) format and [**JSON Merge Patch**](https://tools.ietf.org/html/rfc7386). It also contains some minor changes and bug fixes. All changes are backward-compatible.
-
-### :sparkles: New features
-
-- The library now supports [**UBJSON**](http://ubjson.org) (Universal Binary JSON Specification) as binary format to read and write JSON values space-efficiently. See the [documentation overview](https://json.nlohmann.me/features/binary_formats/) for a comparison of the different formats CBOR, MessagePack, and UBJSON.
-- [**JSON Merge Patch**](https://tools.ietf.org/html/rfc7386) (RFC 7386) offers an intuitive means to describe patches between JSON values (#876, #877). See the documentation of [`merge_patch`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a0ec0cd19cce42ae6071f3cc6870ea295.html#a0ec0cd19cce42ae6071f3cc6870ea295) for more information.
-
-### :zap: Improvements
-
-- The library now uses the **Grisu2 algorithm** for printing floating-point numbers (based on the reference implementation by Florian Loitsch) which produces a short representation which is guaranteed to round-trip (#360, #935, #936).
-- The **UTF-8 handling** was further simplified by using the decoder of Björn Hoehrmann in more scenarios.
-
-### :truck: Reorganization
-
-- Though the library is released as a single header, its development got more and more complicated. With this release, the header is **split into several files** and the single-header file `json.hpp` can be generated from these development sources. In the repository, folder `include` contains the development sources and `single_include` contains the single `json.hpp` header (#700, #906, #907, #910, #911, #915, #920, #924, #925, #928, #944).
-- The split further allowed for a **forward declaration header** `include/nlohmann/json_fwd.hpp` to speed up compilation times (#314).
-
-### :hammer: Further changes
-
-- [Google Benchmark](https://github.com/google/benchmark) is now used for micro benchmarks (see `benchmarks` folder, #921).
-- The serialization (JSON and binary formats) now properly work with the libraries string template parameter, allowing for optimized string implementations to be used in constraint environments such as embedded software (#941, #950).
-- The exceptional behavior can now be overridden by defining macros `JSON_THROW_USER`, `JSON_TRY_USER`, and `JSON_CATCH_USER`, defining the behavior of `throw`, `try` and `catch`, respectively. This allows to switch off C++'s exception mechanism yet still execute user-defined code in case an error condition occurs (#938).
-- To facilitate the interplay with [flex](https://github.com/westes/flex) and [Bison](https://www.gnu.org/software/bison/), the library does not use the variable name `yytext` any more as it could clash with macro definitions (#933).
-- The library now defines `NLOHMANN_JSON_VERSION_MAJOR`, `NLOHMANN_JSON_VERSION_MINOR`, and `NLOHMANN_JSON_VERSION_PATCH` to allow for conditional compilation based on the included library version (#943, #948).
-- A compilation error with ICC has been fixed (#947).
-- Typos and links in the documentation have been fixed (#900, #930).
-- A compiler error related to incomplete types has been fixed (#919).
-- The tests form the [UTF-8 decoder stress test](http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt) have been added to the test suite.
-
-### :fire: Deprecated functions
-
-- Function [`iterator_wrapper`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e) has been deprecated (#874). Since its introduction, the name was up for discussion, as it was too technical. We now introduced the member function [`items()`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd) with the same semantics. `iterator_wrapper` will be removed in the next major version (i.e., 4.0.0).
-
-Furthermore, the following functions are deprecated since version 3.0.0 and will be removed in the next major version (i.e., 4.0.0):
-
-- [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3)
-- [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983)
-
-Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
-
-## v3.0.1
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.0.1/json.hpp) (502 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.0.1/json.hpp.asc) (1 KB)
-
-Release date: 2017-12-29
-SHA-256: c9b3591f1bb94e723a0cd7be861733a3a555b234ef132be1e9027a0364118c4c
-
-### Summary
-
-This release fixes small issues in the implementation of **JSON Pointer** and **JSON Patch**. All changes are backward-compatible.
-
-### Changes
-
-- :bug: The **"copy" operation of JSON Patch** ([RFC 6902](https://tools.ietf.org/html/rfc6902)) requests that it is an error if the target path points into a non-existing array or object (see #894 for a detailed description). This release fixes the implementation to detect such invalid target paths and throw an exception.
-- :bug: An **array index in a JSON Pointer** ([RFC 6901](https://tools.ietf.org/html/rfc6901)) must be an integer. This release fixes the implementation to throw an exception in case invalid array indices such as `10e2` are used.
-- :white_check_mark: Added the [JSON Patch tests](https://github.com/json-patch/json-patch-tests) from Byron Ruth and Mike McCabe.
-- :memo: Fixed the documentation of the [`at(ptr)` function with JSON Pointers](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a8ab61397c10f18b305520da7073b2b45.html#a8ab61397c10f18b305520da7073b2b45) to list all possible exceptions (see #888).
-- :memo: Updated the [container overview documentation](https://nlohmann.github.io/json/) (see #883).
-- :wrench: The CMake files now respect the [`BUILD_TESTING`](https://cmake.org/cmake/help/latest/module/CTest.html?highlight=build_testing) option (see #846, #885)
-- :rotating_light: Fixed some compiler warnings (see #858, #882).
-
-### Deprecated functions
-
-:fire: To unify the interfaces and to improve similarity with the STL, the following functions are deprecated since version 3.0.0 and will be removed in the next major version (i.e., 4.0.0):
-
-- [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3)
-- [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983)
-
-Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
-
-## v3.0.0
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v3.0.0/json.hpp) (501 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v3.0.0/json.hpp.asc) (1 KB)
-
-Release date: 2017-12-17
-SHA-256: 076d4a0cb890a3c3d389c68421a11c3d77c64bd788e85d50f1b77ed252f2a462
-
-### Summary
-
-
-
-After almost a year, here is finally a new release of JSON for Modern C++, and it is a major one! As we adhere to [semantic versioning](https://semver.org), this means the release includes some breaking changes, so please read the next section carefully before you update. But don't worry, we also added a few new features and put a lot of effort into fixing a lot of bugs and straighten out a few inconsistencies.
-
-### :boom: Breaking changes
-
-This section describes changes that change the public API of the library and may require changes in code using a previous version of the library. In section "Moving from 2.x.x to 3.0.0" at the end of the release notes, we describe in detail how existing code needs to be changed.
-
-- The library now uses [**user-defined exceptions**](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9a0aced019cb1d65bb49703406c84970.html#a9a0aced019cb1d65bb49703406c84970) instead of reusing those defined in `` (#244). This not only allows to add more information to the exceptions (every exception now has an identifier, and parse errors contain the position of the error), but also to easily catch all library exceptions with a single `catch(json::exception)`.
-- When strings with a different encoding as UTF-8 were stored in JSON values, their serialization could not be parsed by the library itself, as only UTF-8 is supported. To enforce this library limitation and improve consistency, **non-UTF-8 encoded strings now yield a `json::type_error` exception during serialization** (#838). The check for valid UTF-8 is realized with code from [Björn Hoehrmann](http://bjoern.hoehrmann.de/).
-- **NaN and infinity values can now be stored inside the JSON value** without throwing an exception. They are, however, still serialized as `null` (#388).
-- The library's iterator tag was changed from RandomAccessIterator to **[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator)** (#593). Supporting RandomAccessIterator was incorrect as it assumed an ordering of values in a JSON objects which are unordered by definition.
-- The library does not include the standard headers ``, ``, and `` any more. You may need to add these headers to code relying on them.
-- Removed constructor `explicit basic_json(std::istream& i, const parser_callback_t cb = nullptr)` which was deprecated in version 2.0.0 (#480).
-
-### :fire: Deprecated functions
-
-To unify the interfaces and to improve similarity with the STL, the following functions are now deprecated and will be removed in the next major version (i.e., 4.0.0):
-
-- [`friend std::istream& operator<<(basic_json&, std::istream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3)
-- [`friend std::ostream& operator>>(const basic_json&, std::ostream&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983)
-
-Please use [`friend std::istream& operator>>(std::istream&, basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8) and [`friend operator<<(std::ostream&, const basic_json&)`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405) instead.
-
-### :sparkles: New features
-
-With all this breaking and deprecation out of the way, let's talk about features!
-
-- We improved the **diagnostic information for syntax errors** (#301). Now, an exception [`json::parse_error`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1efc2468e6022be6e35fc2944cabe4d.html#af1efc2468e6022be6e35fc2944cabe4d) is thrown which contains a detailed message on the error, but also a member `byte` to indicate the byte offset in the input where the error occurred.
-- We added a **non-throwing syntax check** (#458): The new `accept` function returns a Boolean indicating whether the input is proper JSON. We also added a Boolean parameter `allow_exceptions` to the existing [`parse`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aa9676414f2e36383c4b181fe856aa3c0.html#aa9676414f2e36383c4b181fe856aa3c0) functions to return a `discarded` value in case a syntax error occurs instead of throwing an exception.
-- An [`update`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a1cfa9ae5e7c2434cab4cfe69bffffe11.html#a1cfa9ae5e7c2434cab4cfe69bffffe11) function was added to **merge two JSON objects** (#428). In case you are wondering: the name was inspired by [Python](https://docs.python.org/2/library/stdtypes.html#dict.update).
-- The [`insert`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a1b0a4e60d56f1fe80501ed941e122892.html#a1b0a4e60d56f1fe80501ed941e122892) function now also supports an iterator range to add elements to an object.
-- The binary exchange formats **CBOR and MessagePack can now be parsed from input streams and written to output streams** (#477).
-- Input streams are now only read until the end of a JSON value instead of the end of the input (#367).
-- The serialization function [`dump`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5adea76fedba9898d404fef8598aa663.html#a5adea76fedba9898d404fef8598aa663) now has two optional parameters `ensure_ascii` to **escape all non-ASCII characters** with `\uxxxx` and an `indent_char` parameter to choose whether to **indent with spaces or tabs** (#654).
-- Added **built-in type support** for C arrays (#502), `std::pair` and `std::tuple` (#563, #614), `enum` and `enum class` (#545), `std::vector` (#494). Fixed support for `std::valarray` (#702), `std::array` (#553), and `std::map` (#600, #607).
-
-### :hammer: Further changes
-
-Furthermore, there have been a lot of changes under the hood:
-
-- Replaced the [re2c](http://re2c.org) generated scanner by a self-coded version which allows for a better modularization of the parser and better diagnostics. To test the new scanner, we added millions (8,860,608 to be exact) of unit tests to check all valid and invalid byte sequences of the Unicode standard.
-- Google's OSS-Fuzz is still constantly fuzz-testing the library and found several issues that were fixed in this release (#497, #504, #514, #516, #518, #519, #575).
-- We now also ignore UTF-8 byte order marks when parsing from an iterator range (#602).
-- Values can be now moved from initializer lists (#663).
-- Updated to [Catch](https://github.com/catchorg/Catch2) 1.9.7. Unfortunately, Catch2 currently has some performance issues.
-- The non-exceptional paths of the library are now annotated with `__builtin_expect` to optimize branch prediction as long as no error occurs.
-- MSVC now produces a stack trace in MSVC if a `from_json` or `to_json` function was not found for a user-defined type. We also added a debug visualizer [`nlohmann_json.natvis`](https://github.com/nlohmann/json/blob/develop/nlohmann_json.natvis) for better debugging in MSVC (#844).
-- Overworked the documentation and added even more examples.
-- The build workflow now relies on CMake and CTest. Special flags can be chosen with CMake, including coverage (`JSON_Coverage`), compilation without exceptions (`JSON_NoExceptions`), LLVM sanitizers (`JSON_Sanitizer`), or execution with Valgrind (`JSON_Valgrind`).
-- Added support for package managers Meson (#576), Conan (#566), Hunter (#671, #829), and vcpkg (#753).
-- Added CI builders: Xcode 8.3, 9.0, 9.1, and 9.2; GCC 7.2; Clang 3.8, 3.9, 4.0, and 5.0; Visual Studio 2017. The library is further built with C++17 settings on the latest Clang, GCC, and MSVC version to quickly detect new issues.
-
-### Moving from 2.x.x to 3.0.0
-
-#### User-defined Exceptions
-
-There are five different exceptions inheriting from [`json::exception`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9a0aced019cb1d65bb49703406c84970.html#a9a0aced019cb1d65bb49703406c84970):
-
-- [`json::parse_error`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1efc2468e6022be6e35fc2944cabe4d.html#af1efc2468e6022be6e35fc2944cabe4d) for syntax errors (including the binary formats),
-- [`json::invalid_iterator`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ac13d32f7cbd02d616e71d8dc30dadcbf.html#ac13d32f7cbd02d616e71d8dc30dadcbf) for errors related to iterators,
-- [`json::type_error`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a4010e8e268fefd86da773c10318f2902.html#a4010e8e268fefd86da773c10318f2902) for errors where functions were called with the wrong JSON type,
-- [`json::out_of_range`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a28f7c2f087274a0012eb7a2333ee1580.html#a28f7c2f087274a0012eb7a2333ee1580) for range errors, and
-- [`json::other_error`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a3333a5a8714912adda33a35b369f7b3d.html#a3333a5a8714912adda33a35b369f7b3d) for miscellaneous errors.
-
-To support these exception, the `try`/`catch` blocks of your code need to be adjusted:
-
-| new exception | previous exception |
-|:---------------------|:-------------------|
-| parse_error.101 | invalid_argument |
-| parse_error.102 | invalid_argument |
-| parse_error.103 | invalid_argument |
-| parse_error.104 | invalid_argument |
-| parse_error.105 | invalid_argument |
-| parse_error.106 | domain_error |
-| parse_error.107 | domain_error |
-| parse_error.108 | domain_error |
-| parse_error.109 | invalid_argument |
-| parse_error.110 | out_of_range |
-| parse_error.111 | invalid_argument |
-| parse_error.112 | invalid_argument |
-| invalid_iterator.201 | domain_error |
-| invalid_iterator.202 | domain_error |
-| invalid_iterator.203 | domain_error |
-| invalid_iterator.204 | out_of_range |
-| invalid_iterator.205 | out_of_range |
-| invalid_iterator.206 | domain_error |
-| invalid_iterator.207 | domain_error |
-| invalid_iterator.208 | domain_error |
-| invalid_iterator.209 | domain_error |
-| invalid_iterator.210 | domain_error |
-| invalid_iterator.211 | domain_error |
-| invalid_iterator.212 | domain_error |
-| invalid_iterator.213 | domain_error |
-| invalid_iterator.214 | out_of_range |
-| type_error.301 | domain_error |
-| type_error.302 | domain_error |
-| type_error.303 | domain_error |
-| type_error.304 | domain_error |
-| type_error.305 | domain_error |
-| type_error.306 | domain_error |
-| type_error.307 | domain_error |
-| type_error.308 | domain_error |
-| type_error.309 | domain_error |
-| type_error.310 | domain_error |
-| type_error.311 | domain_error |
-| type_error.313 | domain_error |
-| type_error.314 | domain_error |
-| type_error.315 | domain_error |
-| out_of_range.401 | out_of_range |
-| out_of_range.402 | out_of_range |
-| out_of_range.403 | out_of_range |
-| out_of_range.404 | out_of_range |
-| out_of_range.405 | domain_error |
-| other_error.501 | domain_error |
-
-#### Handling of NaN and INF
-
-- If an overflow occurs during parsing a number from a JSON text, an exception [`json::out_of_range`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a28f7c2f087274a0012eb7a2333ee1580.html#a28f7c2f087274a0012eb7a2333ee1580) is thrown so that the overflow is detected early and roundtripping is guaranteed.
-
-- NaN and INF floating-point values can be stored in a JSON value and are not replaced by null. That is, the basic_json class behaves like `double` in this regard (no exception occurs). However, NaN and INF are serialized to `null`.
-
-#### Removal of deprecated functions
-
-Function `explicit basic_json(std::istream& i, const parser_callback_t cb = nullptr)` should be replaced by the `parse` function: Let `ss` be a stream and `cb` be a parse callback function.
-
-Old code:
-
-```cpp
-json j(ss, cb);
-```
-
-New code:
-
-```cpp
-json j = json::parse(ss, cb);
-```
-
-If no callback function is used, also the following code works:
-
-```cpp
-json j;
-j << ss;
-```
-
-or
-
-```cpp
-json j;
-ss >> j;
-```
-
-## v2.1.1
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.1.1/json.hpp) (437 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.1.1/json.hpp.asc) (1 KB)
-
-Release date: 2017-02-25
-SHA-256: faa2321beb1aa7416d035e7417fcfa59692ac3d8c202728f9bcc302e2d558f57
-
-### Summary
-
-This release **fixes a locale-related bug in the parser**. To do so, the whole number handling (lexer, parser, and also the serialization) have been overworked. Furthermore, a lot of small changes added up that were added to this release. All changes are backward-compatible.
-
-### Changes
-- :bug: Locales that have a different character than `.` as decimal separator (e.g., the Norwegian locale `nb_NO.UTF-8`) led to truncated number parsing or parse errors. The library now has been fixed to work with **any locale**. Note that `.` is still the only valid decimal separator for JSON input.
-- :bug: Numbers like `1.0` were correctly parsed as floating-point number, but serialized as integer (`1`). Now, **floating-point numbers correctly round trip**.
-- :bug: Parsing incorrect JSON numbers with leading 0 (`0123`) could yield a [buffer overflow](https://github.com/nlohmann/json/issues/452). This is fixed now by detecting such errors directly by the lexer.
-- :bug: Constructing a JSON value from a pointer was incorrectly interpreted as a Boolean; such code will now yield a compiler error.
-- :bug: Comparing a JSON number with `0` led to a comparison with `null`. This is fixed now.
-- :bug: All throw calls are now wrapped in macros.
-- :lock: Starting during the preparation of this release (since 8 February 2017), commits and released files are **cryptographically signed** with [this GPG key](https://keybase.io/nlohmann/pgp_keys.asc?fingerprint=797167ae41c0a6d9232e48457f3cea63ae251b69). Previous releases have also been signed.
-- :sparkles: The parser for MessagePack and CBOR now supports an optional start index parameter to define a byte offset for the parser.
-- :rotating_light: Some more warnings have been fixed. With Clang, the code compiles **without warnings** with `-Weverything` (well, it needs `-Wno-documentation-unknown-command` and `-Wno-deprecated-declarations`, but you get the point).
-- :hammer: The code can be compiled easier with many Android NDKs by avoiding macros like `UINT8_MAX` which previously required defining a preprocessor macro for compilation.
-- :zap: The unit tests now compile two times faster.
-- :heavy_plus_sign: [Cotire](https://github.com/sakra/cotire) is used to speed up the build.
-- :pencil2: Fixed a lot of typos in the documentation.
-- :memo: Added a section to the README file that lists all used [third-party code/tools](https://github.com/nlohmann/json#used-third-party-tools).
-- :memo: Added a note on constructing a string value vs. parsing.
-- :white_check_mark: The test suite now contains 11202597 unit tests.
-- :memo: Improved the [Doxygen documentation](https://nlohmann.github.io/json/) by shortening the template parameters of class `basic_json`.
-- :construction_worker: Removed Doozer.
-- :construction_worker: Added Codacity.
-- :arrow_up: Upgraded Catch to version 1.7.2.
-
-
-## v2.1.0
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.1.0/json.hpp) (426 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.1.0/json.hpp.asc) (1 KB)
-
-- Release date: 2017-01-28
-- SHA-256: a571dee92515b685784fd527e38405cf3f5e13e96edbfe3f03d6df2e363a767b
-
-### Summary
-
-This release introduces a means to convert from/to user-defined types. The release is backwards compatible.
-
-
-
-### Changes
-- :sparkles: The library now offers an elegant way to **convert from and to arbitrary value types**. All you need to do is to implement two functions: `to_json` and `from_json`. Then, a conversion is as simple as putting a `=` between variables. See the [README](https://github.com/nlohmann/json#arbitrary-types-conversions) for more information and examples.
-- :sparkles: **Exceptions can now be switched off.** This can be done by defining the preprocessor symbol `JSON_NOEXCEPTION` or by passing `-fno-exceptions` to your compiler. In case the code would usually thrown an exception, `abort()` is now called.
-- :sparkles: **Information on the library** can be queried with the new (static) function `meta()` which returns a JSON object with information on the version, compiler, and platform. See the [documentation]() for an example.
-- :bug: A bug in the CBOR parser was fixed which led to a buffer overflow.
-- :sparkles: The function [`type_name()`]() is now public. It allows to query the type of a JSON value as string.
-- :white_check_mark: Added the [Big List of Naughty Strings](https://github.com/minimaxir/big-list-of-naughty-strings) as test case.
-- :arrow_up: Updated to [Catch v1.6.0](https://github.com/philsquared/Catch/releases/tag/v1.6.0).
-- :memo: Some typos in the documentation have been fixed.
-
-
-## v2.0.10
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.10/json.hpp) (409 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.10/json.hpp.asc) (1 KB)
-
-- Release date: 2017-01-02
-- SHA-256: ec27d4e74e9ce0f78066389a70724afd07f10761009322dc020656704ad5296d
-
-### Summary
-
-This release fixes several security-relevant bugs in the MessagePack and CBOR parsers. The fixes are backwards compatible.
-
-### Changes
-- :bug: Fixed a lot of **bugs in the CBOR and MesssagePack parsers**. These bugs occurred if invalid input was parsed and then could lead in buffer overflows. These bugs were found with Google's [OSS-Fuzz](https://github.com/google/oss-fuzz), see #405, #407, #408, #409, #411, and #412 for more information.
-- :construction_worker: We now also use the **[Doozer](https://doozer.io) continuous integration platform**.
-- :construction_worker: The complete test suite is now also run with **Clang's address sanitizer and undefined-behavior sanitizer**.
-- :white_check_mark: Overworked **fuzz testing**; CBOR and MessagePack implementations are now fuzz-tested. Furthermore, all fuzz tests now include a round trip which ensures created output can again be properly parsed and yields the same JSON value.
-- :memo: Clarified documentation of `find()` function to always return `end()` when called on non-object value types.
-- :hammer: Moved thirdparty test code to `test/thirdparty` directory.
-
-## v2.0.9
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.9/json.hpp) (406 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.9/json.hpp.asc) (1 KB)
-
-- Release date: 2016-12-16
-- SHA-256: fbf3396f13e187d6c214c297bddc742d918ea9b55e10bfb3d9f458b9bfdc22e5
-
-### Summary
-
-This release implements with **[CBOR](http://cbor.io)** and **[MessagePack](http://msgpack.org)** two **binary serialization/deserialization formats**. It further contains some small fixes and improvements. The fixes are backwards compatible.
-
-
-
-### Changes
-- :sparkles: The library can now read and write the binary formats **[CBOR](http://cbor.io)** (Concise Binary Object Representation) and **[MessagePack](http://msgpack.org)**. Both formats are aimed to produce a very compact representation of JSON which can be parsed very efficiently. See the [README file](https://github.com/nlohmann/json#binary-formats-cbor-and-messagepack) for more information and examples.
-- :fire: simplified the iteration implementation allowing to remove dozens of lines of code
-- :bug: fixed an [integer overflow error](https://github.com/nlohmann/json/issues/389) detected by [Google's OSS-Fuzz](https://github.com/google/oss-fuzz)
-- :bug: suppressed documentation warnings inside the library to facilitate compilation with `-Wdocumentation`
-- :bug: fixed an overflow detection error in the number parser
-- :memo: updated [contribution guidelines](https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md) to a list of frequentely asked features that will most likely be never added to the library
-- :memo: added a **table of contents** to the [README file](https://github.com/nlohmann/json/blob/develop/README.md) to add some structure
-- :memo: mentioned the many [examples](https://github.com/nlohmann/json/tree/develop/docs/mkdocs/docs/examples) and the [documentation](https://nlohmann.github.io/json/) in the [README file]()
-- :hammer: split [unit tests](https://github.com/nlohmann/json/tree/develop/tests/src) into individual independent binaries to speed up compilation and testing
-- :white_check_mark: the test suite now contains **11201886** tests
-
-## v2.0.8
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.8/json.hpp) (360 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.8/json.hpp.asc) (1 KB)
-
-- Release date: 2016-12-02
-- SHA-256: b70db0ad34f8e0e61dc3f0cbab88099336c9674c193d8a3439d93d6aca2d7120
-
-### Summary
-
-This release combines a lot of small fixes and improvements. The fixes are backwards compatible.
-
-### Changes
-- :bug: fixed a bug that froze the parser if a passed file was not found (now, `std::invalid_argument` is thrown)
-- :bug: fixed a bug that lead to an error of a file at EOF was parsed again (now, `std::invalid_argument` is thrown)
-- :sparkles: the well known functions [`emplace`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a602f275f0359ab181221384989810604.html#a602f275f0359ab181221384989810604) and [`emplace_back`](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af8a435033327d9237da414afc1cce513.html#af8a435033327d9237da414afc1cce513) have been added to JSON values and work as expected
-- :zap: improved the performance of the serialization (`dump` function)
-- :zap: improved the performance of the deserialization (parser)
-- :construction_worker: some continuous integration images at [Travis](https://travis-ci.org/nlohmann/json) were added and retired; see [here](https://github.com/nlohmann/json#supported-compilers) for the current continuous integration setup
-- :construction_worker: the [Coverity scan](https://scan.coverity.com/projects/nlohmann-json) works again
-- :chart_with_upwards_trend: the benchmarking code has been improved to produce more stable results
-- :memo: the [README](https://github.com/nlohmann/json/blob/develop/README.md) file has been extended and includes more frequently asked examples
-- :white_check_mark: the test suite now contains 8905518 tests
-- :arrow_up: updated [Catch](https://github.com/philsquared/Catch) to version 1.5.8
-
-## v2.0.7
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.7/json.hpp) (355 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.7/json.hpp.asc) (1 KB)
-
-- Release date: 2016-11-02
-- SHA-256: 5545c323670f8165bae90b9dc6078825e86ec310d96cc4e5b47233ea43715bbf
-
-### Summary
-
-This release fixes a few bugs in the JSON parser found in the [Parsing JSON is a Minefield 💣](https://seriot.ch/projects/parsing_json.html) article. The fixes are backwards compatible.
-
-### Changes
-- The article [Parsing JSON is a Minefield 💣](https://seriot.ch/projects/parsing_json.html) discusses a lot of pitfalls of the JSON specification. When investigating the published test cases, a few bugs in the library were found and fixed:
- - Files with less than 5 bytes can now be parsed without error.
- - The library now properly rejects any file encoding other than UTF-8. Furthermore, incorrect surrogate pairs are properly detected and rejected.
- - The library now accepts all but one "yes" test (y_string_utf16.json): UTF-16 is not supported.
- - The library rejects all but one "no" test (n_number_then_00.json): Null bytes are treated as end of file instead of an error. This allows to parse input from null-terminated strings.
-- The string length passed to a user-defined string literal is now exploited to choose a more efficient constructor.
-- A few grammar mistakes in the README file have been fixed.
-
-## v2.0.6
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.6/json.hpp) (349 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.6/json.hpp.asc) (1 KB)
-
-- Release date: 2016-10-15
-- SHA256: 459cc93d5e2f503e50c6d5876eb86bfea7daf405f5a567c5a2c9abc2383756ae
-
-### Summary
-
-This release fixes the semantics of `operator[]` for JSON Pointers (see below). This fix is backwards compatible.
-
-### Changes
-- **`operator[]` for JSON Pointers** now behaves like the other versions of `operator[]` and transforms `null` values into objects or arrays if required. This allows to created nested structures like `j["/foo/bar/2"] = 17` (yielding `{"foo": "bar": [null, null, 17]}`) without problems.
-- overworked a helper SFINAE function
-- fixed some documentation issues
-- fixed the CMake files to allow to run the test suite outside the main project directory
-- restored test coverage to 100%.
-
-## v2.0.5
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.5/json.hpp) (347 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.5/json.hpp.asc) (1 KB)
-
-- Release date: 2016-09-14
-- SHA-256: 8b7565263a44e2b7d3b89808bc73d2d639037ff0c1f379e3d56dbd77e00b98d9
-
-### Summary
-
-This release fixes a regression bug in the stream parser (function `parse()` and the `<<`/`>>` operators). This fix is backwards compatible.
-
-### Changes
-- **Bug fix**: The end of a file stream was not detected properly which led to parse errors. This bug should have been fixed with 2.0.4, but there was still a flaw in the code.
-
-## v2.0.4
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.4/json.hpp) (347 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.4/json.hpp.asc) (1 KB)
-
-- Release date: 2016-09-11
-- SHA-256: 632ceec4c25c4e2153f71470d3a2b992c8355f6d8b4d627d05dd16095cd3aeda
-
-### Summary
-
-This release fixes a bug in the stream parser (function `parse()` and the `<<`/`>>` operators). This fix is backwards compatible.
-
-### Changes
-- **Bug fix**: The end of a file stream was not detected properly which led to parse errors.
-- Fixed a compiler warning about an unused variable.
-
-## v2.0.3
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.3/json.hpp) (347 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.3/json.hpp.asc) (1 KB)
-
-- Release date: 2016-08-31
-- SHA-256: 535b73efe5546fde9e763c14aeadfc7b58183c0b3cd43c29741025aba6cf6bd3
-
-### Summary
-
-This release combines a lot of small fixes and improvements. The release is backwards compatible.
-
-### Changes
-- The **parser/deserialization functions have been generalized** to process any contiguous sequence of 1-byte elements (e.g., `char`, `unsigned char`, `uint8_t`). This includes all kind of string representations (string literals, char arrays, `std::string`, `const char*`), contiguous containers (C-style arrays, `std::vector`, `std::array`, `std::valarray`, `std::initializer_list`). User-defined containers providing random-access iterator access via `std::begin` and `std::end` can be used as well. See the documentation ([1](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_ace63ac4eb1dd7251a259d32e397461a3.html#ace63ac4eb1dd7251a259d32e397461a3), [2](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a90f05d55d9d0702c075cd281fd0d85ae.html#a90f05d55d9d0702c075cd281fd0d85ae), [3](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_aeffd70f622f8f2a51fd3d95af64b63a7.html#aeffd70f622f8f2a51fd3d95af64b63a7), [4](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_aa8dca2e91a6301c36890f844e64f0023.html#aa8dca2e91a6301c36890f844e64f0023)) for more information. Note that contiguous storage cannot be checked at compile time; if any of the parse functions are called with a noncompliant container, the behavior is undefined and will most likely yield segmentation violation. The preconditions are enforced by an assertion unless the library is compiled with preprocessor symbol `NDEBUG`.
-- As a general remark on **assertions**: The library uses assertions to preclude undefined behavior. A [prominent example](https://github.com/nlohmann/json/issues/289) for this is the `operator[]` for const JSON objects. The behavior of this const version of the operator is undefined if the given key does not exist in the JSON object, because unlike the non-const version, it cannot add a `null` value at the given key. Assertions can be switched of by defining the preprocessor symbol `NDEBUG`. See the [documentation of `assert`](http://en.cppreference.com/w/cpp/error/assert) for more information.
-- In the course of cleaning up the parser/deserialization functions, the constructor [`basic_json(std::istream&, const parser_callback_t)`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a32350263eb105764844c5a85e156a255.html#a32350263eb105764844c5a85e156a255) has been **deprecated** and will be deleted with the next major release 3.0.0 to unify the interface of the library. Deserialization will be done by stream operators or by calling one of the `parse` functions. That is, calls like `json j(i);` for an input stream `i` need to be replaced by `json j = json::parse(i);`. Compilers will produce a deprecation warning if client code uses this function.
-- Minor improvements:
- - Improved the performance of the serialization by avoiding the re-creation of a locale object.
- - Fixed two MSVC warnings. Compiling the test suite with `/Wall` now only warns about non-inlined functions (C4710) and the deprecation of the constructor from input-stream (C4996).
-- Some project internals:
- -
The project has qualified for the [Core Infrastructure Initiative Best Practices Badge](https://bestpractices.coreinfrastructure.org/projects/289). While most requirements where already satisfied, some led to more explicit documentation of quality-ensuring procedures. For instance, static analysis is now executed with every commit on the build server. Furthermore, the [contribution guidelines document](https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md) how to communicate security issues privately.
- - The test suite has been overworked and split into several files to allow for faster compilation and analysis. The execute the test suite, simply execute `make check`.
- - The continuous integration with [Travis](https://travis-ci.org/nlohmann/json) was extended with Clang versions 3.6.0 to 3.8.1 and now includes 18 different compiler/OS combinations.
- - An 11-day run of [American fuzzy lop](http://lcamtuf.coredump.cx/afl/) checked 962 million inputs on the parser and found no issue.
-
-## v2.0.2
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.2/json.hpp) (338 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.2/json.hpp.asc) (1 KB)
-
-- Release date: 2016-07-31
-- SHA-256: 8e97b7965b4594b00998d6704465412360e1a0ed927badb51ded8b82291a8f3d
-
-### Summary
-
-This release combines a lot of small fixes and improvements. The release is backwards compatible.
-
-### Changes
-- The **parser** has been overworked, and a lot of small issues have been fixed:
- - Improved parser performance by avoiding recursion and using move semantics for the return value.
- - Unescaped control characters `\x10`-`\x1f` are not accepted any more.
- - Fixed a bug in the parser when reading from an input stream.
- - Improved test case coverage for UTF-8 parsing: now, all valid Unicode code points are tested both escaped and unescaped.
- - The precision of output streams is now preserved by the parser.
-- Started to check the **code correctness** by proving termination of important loops. Furthermore, individual assertions have been replaced by a more systematic function which checks the class invariants. Note that assertions should be switched off in production by defining the preprocessor macro `NDEBUG`, see the [documentation of `assert`](http://en.cppreference.com/w/cpp/error/assert).
-- A lot of **code cleanup**: removed unused headers, fixed some compiler warnings, and fixed a build error for Windows-based Clang builds.
-- Added some compile-time checks:
- - Unsupported compilers are rejected during compilation with an `#error` command.
- - Static assertion prohibits code with incompatible pointer types used in `get_ptr()`.
-- Improved the [documentation](https://nlohmann.github.io/json/), and adjusted the documentation script to choose the correct version of `sed`.
-- Replaced a lot of "raw loops" by STL functions like `std::all_of`, `std::for_each`, or `std::accumulate`. This facilitates reasoning about termination of loops and sometimes allowed to simplify functions to a single return statement.
-- Implemented a `value()` function for JSON pointers (similar to `at` function).
-- The Homebrew formula (see [Integration](https://github.com/nlohmann/json#integration)) is now tested for all Xcode builds (6.1 - 8.x) with Travis.
-- Avoided output to `std::cout` in the test cases.
-
-## v2.0.1
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.1/json.hpp) (321 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.1/json.hpp.asc) (1 KB)
-
-- Release date: 2016-06-28
-- SHA-256: ef550fcd7df572555bf068e9ec4e9d3b9e4cdd441cecb0dcea9ea7fd313f72dd
-
-### Summary
-
-This release fixes a performance regression in the JSON serialization (function `dump()`). This fix is backwards compatible.
-
-### Changes
-- The locale of the output stream (or the internal string stream if a JSON value is serialized to a string) is now adjusted once for the whole serialization instead of for each floating-point number.
-- The locale of an output stream is now correctly reset to the previous value by the JSON library.
-
-
-## v2.0.0
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v2.0.0/json.hpp) (321 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v2.0.0/json.hpp.asc) (1 KB)
-
-- Release date: 2016-06-24
-- SHA-256: ac9e1fb25c2ac9ca5fc501fcd2fe3281fe04f07018a1b48820e7b1b11491bb6c
-
-### Summary
-
-This release adds several features such as JSON Pointers, JSON Patch, or support for 64 bit unsigned integers. Furthermore, several (subtle) bugs have been fixed.
-
-As `noexcept` and `constexpr` specifier have been added to several functions, the public API has effectively been changed in a (potential) non-backwards compatible manner. As we adhere to [Semantic Versioning](http://semver.org), this calls for a new major version, so say hello to 2️⃣.0️⃣.0️⃣.
-
-### Changes
-- 🔟 A JSON value now uses `uint64_t` (default value for template parameter `NumberUnsignedType`) as data type for **unsigned integer** values. This type is used automatically when an unsigned number is parsed. Furthermore, constructors, conversion operators and an `is_number_unsigned()` test have been added.
-- 👉 **JSON Pointer** ([RFC 6901](https://tools.ietf.org/html/rfc6901)) support: A JSON Pointer is a string (similar to an XPath expression) to address a value inside a structured JSON value. JSON Pointers can be used in `at()` and `operator[]` functions. Furthermore, JSON values can be “flattened” to key/value pairs using `flatten()` where each key is a JSON Pointer. The original value can be restored by “unflattening” the flattened value using `unflatten()`.
-- 🏥 **JSON Patch** ([RFC 6902](https://tools.ietf.org/html/rfc6902)) support. A JSON Patch is a JSON value that describes the required edit operations (add, change, remove, …) to transform a JSON value into another one. A JSON Patch can be created with function `diff(const basic_json&)` and applied with `patch(const basic_json&)`. Note the created patches use a rather primitive algorithm so far and leave room for improvement.
-- 🇪🇺 The code is now **locale-independent**: Floating-point numbers are always serialized with a period (`.`) as decimal separator and ignores different settings from the locale.
-- 🍺 **Homebrew** support: Install the library with `brew tap nlohmann/json && brew install nlohmann_json`.
-- Added constructor to create a JSON value by parsing a `std::istream` (e.g., `std::stringstream` or `std::ifstream`).
-- Added **`noexcept`** specifier to `basic_json(boolean_t)`, `basic_json(const number_integer_t)`, `basic_json(const int)`, `basic_json(const number_float_t)`, iterator functions (`begin()`, `end()`, etc.)
-- When parsing numbers, the sign of `0.0` (vs. `-0.0`) is preserved.
-- Improved MSVC 2015, Android, and MinGW support. See [README](https://github.com/nlohmann/json#supported-compilers) for more information.
-- Improved test coverage (added 2,225,386 tests).
-- Removed some misuses of `std::move`.
-- Fixed several compiler warnings.
-- Improved error messages from JSON parser.
-- Updated to [`re2c`](http://re2c.org) to version 0.16 to use a minimal DFAs for the lexer.
-- Updated test suite to use [Catch](https://github.com/philsquared/Catch) version 1.5.6.
-- Made type getters (`is_number`, etc.) and const value access `constexpr`.
-- Functions `push_back` and `operator+=` now work with key/value pairs passed as initializer list, e.g. `j_object += {"key", 1}`.
-- Overworked `CMakeLists.txt` to make it easier to integrate the library into other projects.
-
-### Notes
-- Parser error messages are still very vague and contain no information on the error location.
-- The implemented `diff` function is rather primitive and does not create minimal diffs.
-- The name of function `iteration_wrapper` may change in the future and the function will be deprecated in the next release.
-- Roundtripping (i.e., parsing a JSON value from a string, serializing it, and comparing the strings) of floating-point numbers is not 100% accurate. Note that [RFC 8259](https://tools.ietf.org/html/rfc8259) defines no format to internally represent numbers and states not requirement for roundtripping. Nevertheless, benchmarks like [Native JSON Benchmark](https://github.com/miloyip/nativejson-benchmark) treat roundtripping deviations as conformance errors.
-
-
-## v1.1.0
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v1.1.0/json.hpp) (257 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v1.1.0/json.hpp.asc) (1 KB)
-
-- Release date: 2016-01-24
-- SHA-256: c0cf0e3017798ca6bb18e757ebc570d21a3bdac877845e2b9e9573d183ed2f05
-
-### Summary
-
-This release fixes several small bugs and adds functionality in a backwards-compatible manner. Compared to the [last version (1.0.0)](https://github.com/nlohmann/json/releases/tag/v1.0.0), the following changes have been made:
-
-### Changes
-- _Fixed_: **Floating-point numbers** are now serialized and deserialized properly such that roundtripping works in more cases. [#185, #186, #190, #191, #194]
-- _Added_: The code now contains **assertions** to detect undefined behavior during development. As the standard function `assert` is used, the assertions can be switched off by defining the preprocessor symbol `NDEBUG` during compilation. [#168]
-- _Added_: It is now possible to get a **reference** to the stored values via the newly added function `get_ref()`. [#128, #184]
-- _Fixed_: Access to object values via keys (**`operator[]`**) now works with all kind of string representations. [#171, #189]
-- _Fixed_: The code now compiles again with **Microsoft Visual Studio 2015**. [#144, #167, #188]
-- _Fixed_: All required headers are now included.
-- _Fixed_: Typos and other small issues. [#162, #166, #175, #177, #179, #180]
-
-### Notes
-
-There are still known open issues (#178, #187) which will be fixed in version 2.0.0. However, these fixes will require a small API change and will not be entirely backwards-compatible.
-
-
-## v1.0.0
-
-!!! summary "Files"
-
- - [json.hpp](https://github.com/nlohmann/json/releases/download/v1.0.0/json.hpp) (243 KB)
- - [json.hpp.asc](https://github.com/nlohmann/json/releases/download/v1.0.0/json.hpp.asc) (1 KB)
-
-- Release date: 2015-12-28
-- SHA-256: 767dc2fab1819d7b9e19b6e456d61e38d21ef7182606ecf01516e3f5230446de
-
-### Summary
-
-This is the first official release. Compared to the [prerelease version 1.0.0-rc1](https://github.com/nlohmann/json/releases/tag/v1.0.0-rc1), only a few minor improvements have been made:
-
-### Changes
-- _Changed_: A **UTF-8 byte order mark** is silently ignored.
-- _Changed_: `sprintf` is no longer used.
-- _Changed_: `iterator_wrapper` also works for const objects; note: the name may change!
-- _Changed_: **Error messages** during deserialization have been improved.
-- _Added_: The `parse` function now also works with type `std::istream&&`.
-- _Added_: Function `value(key, default_value)` returns either a copy of an object's element at the specified key or a given default value if no element with the key exists.
-- _Added_: Public functions are tagged with the version they were introduced. This shall allow for better **versioning** in the future.
-- _Added_: All public functions and types are **documented** (see http://nlohmann.github.io/json/doxygen/) including executable examples.
-- _Added_: Allocation of all types (in particular arrays, strings, and objects) is now exception-safe.
-- _Added_: They descriptions of thrown exceptions have been overworked and are part of the tests suite and documentation.
+- [Migration Guide](../integration/migration_guide.md) — how to future-proof your code for the next
+ major version and replace deprecated functions.
diff --git a/docs/mkdocs/docs/integration/cmake.md b/docs/mkdocs/docs/integration/cmake.md
index b89e4dbd3..6bdaa4524 100644
--- a/docs/mkdocs/docs/integration/cmake.md
+++ b/docs/mkdocs/docs/integration/cmake.md
@@ -167,7 +167,7 @@ Enable the (incorrect) legacy comparison behavior of discarded JSON values by de
### `JSON_MultipleHeaders`
-Use the non-amalgamated version of the library. This option is `OFF` by default.
+Use the non-amalgamated version of the library. This option is `ON` by default.
### `JSON_SystemInclude`
@@ -176,3 +176,8 @@ Treat the library headers like system headers (i.e., adding `SYSTEM` to the [`ta
### `JSON_Valgrind`
Execute the test suite with [Valgrind](https://valgrind.org). This option is `OFF` by default. Depends on `JSON_BuildTests`.
+
+### `NLOHMANN_JSON_BUILD_MODULES`
+
+Build the experimental [C++ module](../features/modules.md) `nlohmann.json` (requires CMake 3.28 or later and C++20).
+This option is `OFF` by default.
diff --git a/docs/mkdocs/docs/integration/migration_guide.md b/docs/mkdocs/docs/integration/migration_guide.md
index e81b8c08f..cb1c62d7b 100644
--- a/docs/mkdocs/docs/integration/migration_guide.md
+++ b/docs/mkdocs/docs/integration/migration_guide.md
@@ -198,10 +198,6 @@ conversions with calls to [`get`](../api/basic_json/get.md), [`get_to`](../api/b
j.get_to(s);
```
-You can prepare existing code by already defining
-[`JSON_USE_IMPLICIT_CONVERSIONS`](../api/macros/json_use_implicit_conversions.md) to `0` and replace any implicit
-conversions with calls to [`get`](../api/basic_json/get.md).
-
## Import namespace `literals` for UDLs
The user-defined string literals [`operator""_json`](../api/operator_literal_json.md) and
diff --git a/docs/mkdocs/docs/integration/package_managers.md b/docs/mkdocs/docs/integration/package_managers.md
index 0160f48a3..79f872f85 100644
--- a/docs/mkdocs/docs/integration/package_managers.md
+++ b/docs/mkdocs/docs/integration/package_managers.md
@@ -13,7 +13,7 @@
{: style="height:1em"} [**NuGet**](#nuget) `nlohmann.json`
{: style="height:1em"} [**Conda**](#conda) `nlohmann_json`
{: style="height:1em"} [**MacPorts**](#macports) `nlohmann-json`
-{: style="height:1em"} [**CPM.cmake**](#cpmcmake) `gh:nlohmann/json`
+{: style="height:1em"} [**CPM.cmake**](#cpmcmake) `gh:nlohmann/json`
{: style="height:1em"} [**xmake**](#xmake) `nlohmann_json`
@@ -105,7 +105,7 @@ The header can be used directly in your code or via CMake.
- :octicons-tag-24: Available versions: current version and select older versions (see
[WrapDB](https://mesonbuild.com/Wrapdb-projects.html))
- - :octicons-rocket-24: The package is update automatically from file
+ - :octicons-rocket-24: The package is updated automatically from file
[`meson.build`](https://github.com/nlohmann/json/blob/develop/meson.build).
- :octicons-file-24: File issues at the [library issue tracker](https://github.com/nlohmann/json/issues)
- :octicons-question-24: [Meson website](https://mesonbuild.com/index.html)
@@ -197,7 +197,7 @@ repository can be referenced within a `MODULE.bazel` by rules such as `archive_o
- [](https://repology.org/project/nlohmann-json/versions)
- :octicons-tag-24: Available versions: current version and older versions (see
[Conan Center](https://conan.io/center/recipes/nlohmann_json))
- - :octicons-rocket-24: The package is update automatically via
+ - :octicons-rocket-24: The package is updated automatically via
[this recipe](https://github.com/conan-io/conan-center-index/tree/master/recipes/nlohmann_json).
- :octicons-file-24: File issues at the [Conan Center issue tracker](https://github.com/conan-io/conan-center-index/issues)
- :octicons-question-24: [Conan website](https://conan.io)
@@ -603,7 +603,7 @@ conda install -c conda-forge nlohmann_json
--8<-- "integration/conda/example.cpp"
```
- 2. Create and activate an anvironment "json`:
+ 2. Create and activate an environment `json`:
```shell
conda create -n json
@@ -667,7 +667,7 @@ to install the [nlohmann-json](https://ports.macports.org/port/nlohmann-json/) p
sudo port install nlohmann-json
```
- 3. Compile the code and pass the Homebrew prefix to the include path such that the library can be found:
+ 3. Compile the code and pass the MacPorts prefix to the include path such that the library can be found:
```sh
c++ example.cpp -I/opt/local/include -std=c++11 -o example
@@ -709,17 +709,17 @@ to install the [nlohmann-json](https://ports.macports.org/port/nlohmann-json/) p
- [package's sources (for advanced users)](https://github.com/build2-packaging/nlohmann-json/)
- :octicons-tag-24: Available versions: current version and older versions since `3.7.3` (see [cppget.org](https://cppget.org/nlohmann-json))
- - :octicons-rocket-24: The package is maintained and published by the `build2` community in [this repository][(https://github.com/build2-packaging/nlohmann-json/](https://github.com/build2-packaging/nlohmann-json/)).
+ - :octicons-rocket-24: The package is maintained and published by the `build2` community in [this repository](https://github.com/build2-packaging/nlohmann-json/).
- :octicons-file-24: File issues at the [package source repository](https://github.com/build2-packaging/nlohmann-json/issues/)
- - :octicons-question-24: [`build2` website](https://build2)
+ - :octicons-question-24: [`build2` website](https://build2.org)
Note: [`build2`](https://build2.org) should not be considered as a standalone package-manager. It is a build-system + package manager + project manager, a set of tools that work hand-in-hand. `build2`-based projects do not rely on existing `CMake` scripts and the build scripts defining the project's targets are specific to `build2`.
-To use this package in an exising [`build2`](https://build2.org) project, the general steps are:
+To use this package in an existing [`build2`](https://build2.org) project, the general steps are:
1. Make the package available to download from a package repository that provides it.
- Your project's `repositories.manifest` specifies where the package manager will try to acquire packages by default. Make sure one of the repositories specified in this file provides `nlhomann-json` package.
+ Your project's `repositories.manifest` specifies where the package manager will try to acquire packages by default. Make sure one of the repositories specified in this file provides `nlohmann-json` package.
The recommended open-source repository is [`cppget.org`](https://cppget.org/).
If the project has been created using [`bdep new`](https://build2.org/bdep/doc/bdep-new.xhtml), `cppget.org` is already specified in `repositories.manifest` but commented, just uncomment these lines:
@@ -740,13 +740,13 @@ To use this package in an exising [`build2`](https://build2.org) project, the ge
- 2. Add this library as dependency of your target that uses it.
+ 3. Add this library as dependency of your target that uses it.
In the `buildfile` defining the target that will use this library:
- - import the target `lib{json}` from the `nlhomann-json` package, for example:
+ - import the target `lib{json}` from the `nlohmann-json` package, for example:
```
- import nljson = nlhomann-json%lib{json}
+ import nljson = nlohmann-json%lib{json}
```
- then add the library's target as requirement for your target using it, for example:
@@ -756,7 +756,7 @@ To use this package in an exising [`build2`](https://build2.org) project, the ge
- 3. Use the library in your project's code and build it.
+ 4. Use the library in your project's code and build it.
At this point, assuming your project is initialized in a build-configuration, any `b` or `bdep update` command that will update/build the project will also acquire the missing dependency automatically, then build it and link it with your target.
@@ -818,7 +818,7 @@ To use this package in an exising [`build2`](https://build2.org) project, the ge
# build only,
b
- # or build and test the executable's output, will only work if the `tescript` is correct
+ # or build and test the executable's output, will only work if the `testscript` is correct
b test
```
diff --git a/include/nlohmann/detail/input/parser.hpp b/include/nlohmann/detail/input/parser.hpp
index 4b1963f4a..ecc78eb72 100644
--- a/include/nlohmann/detail/input/parser.hpp
+++ b/include/nlohmann/detail/input/parser.hpp
@@ -88,9 +88,9 @@ class parser
@param[in] strict whether to expect the last token to be EOF
@param[in,out] result parsed JSON value
- @throw parse_error.101 in case of an unexpected token
- @throw parse_error.102 if to_unicode fails or surrogate error
- @throw parse_error.103 if to_unicode fails
+ @throw parse_error.101 in case of an unexpected token (including invalid
+ unicode escapes and surrogate errors, which are reported with a
+ detailed message)
*/
void parse(const bool strict, BasicJsonType& result)
{
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index 2facfbdf8..36c1f1510 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -13337,9 +13337,9 @@ class parser
@param[in] strict whether to expect the last token to be EOF
@param[in,out] result parsed JSON value
- @throw parse_error.101 in case of an unexpected token
- @throw parse_error.102 if to_unicode fails or surrogate error
- @throw parse_error.103 if to_unicode fails
+ @throw parse_error.101 in case of an unexpected token (including invalid
+ unicode escapes and surrogate errors, which are reported with a
+ detailed message)
*/
void parse(const bool strict, BasicJsonType& result)
{