|
|
|
@ -491,7 +491,7 @@ class basic_json
|
|
|
|
access to object values, a pointer of type `object_t*` must be
|
|
|
|
access to object values, a pointer of type `object_t*` must be
|
|
|
|
dereferenced.
|
|
|
|
dereferenced.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref array_t -- type for an array value
|
|
|
|
@sa see @ref array_t -- type for an array value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
|
|
|
|
|
|
|
|
@ -549,7 +549,7 @@ class basic_json
|
|
|
|
Arrays are stored as pointers in a @ref basic_json type. That is, for any
|
|
|
|
Arrays are stored as pointers in a @ref basic_json type. That is, for any
|
|
|
|
access to array values, a pointer of type `array_t*` must be dereferenced.
|
|
|
|
access to array values, a pointer of type `array_t*` must be dereferenced.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref object_t -- type for an object value
|
|
|
|
@sa see @ref object_t -- type for an object value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -698,9 +698,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
Integer number values are stored directly inside a @ref basic_json type.
|
|
|
|
Integer number values are stored directly inside a @ref basic_json type.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref number_float_t -- type for number values (floating-point)
|
|
|
|
@sa see @ref number_float_t -- type for number values (floating-point)
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref number_unsigned_t -- type for number values (unsigned integer)
|
|
|
|
@sa see @ref number_unsigned_t -- type for number values (unsigned integer)
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -770,8 +770,8 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
Integer number values are stored directly inside a @ref basic_json type.
|
|
|
|
Integer number values are stored directly inside a @ref basic_json type.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref number_float_t -- type for number values (floating-point)
|
|
|
|
@sa see @ref number_float_t -- type for number values (floating-point)
|
|
|
|
@sa @ref number_integer_t -- type for number values (integer)
|
|
|
|
@sa see @ref number_integer_t -- type for number values (integer)
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.0
|
|
|
|
@since version 2.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -837,9 +837,9 @@ class basic_json
|
|
|
|
Floating-point number values are stored directly inside a @ref basic_json
|
|
|
|
Floating-point number values are stored directly inside a @ref basic_json
|
|
|
|
type.
|
|
|
|
type.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref number_integer_t -- type for number values (integer)
|
|
|
|
@sa see @ref number_integer_t -- type for number values (integer)
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref number_unsigned_t -- type for number values (unsigned integer)
|
|
|
|
@sa see @ref number_unsigned_t -- type for number values (unsigned integer)
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -910,7 +910,7 @@ class basic_json
|
|
|
|
- If a subtype is given, it is used and added as unsigned 8-bit integer.
|
|
|
|
- If a subtype is given, it is used and added as unsigned 8-bit integer.
|
|
|
|
- If no subtype is given, the generic binary subtype 0x00 is used.
|
|
|
|
- If no subtype is given, the generic binary subtype 0x00 is used.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref binary -- create a binary array
|
|
|
|
@sa see @ref binary -- create a binary array
|
|
|
|
|
|
|
|
|
|
|
|
@since version 3.8.0
|
|
|
|
@since version 3.8.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -1254,7 +1254,7 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@image html callback_events.png "Example when certain parse events are triggered"
|
|
|
|
@image html callback_events.png "Example when certain parse events are triggered"
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref parser_callback_t for more information and examples
|
|
|
|
@sa see @ref parser_callback_t for more information and examples
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
using parse_event_t = detail::parse_event_t;
|
|
|
|
using parse_event_t = detail::parse_event_t;
|
|
|
|
|
|
|
|
|
|
|
|
@ -1303,7 +1303,7 @@ class basic_json
|
|
|
|
should be kept (`true`) or not (`false`). In the latter case, it is either
|
|
|
|
should be kept (`true`) or not (`false`). In the latter case, it is either
|
|
|
|
skipped completely or replaced by an empty discarded object.
|
|
|
|
skipped completely or replaced by an empty discarded object.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref parse for examples
|
|
|
|
@sa see @ref parse for examples
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -1344,7 +1344,7 @@ class basic_json
|
|
|
|
@liveexample{The following code shows the constructor for different @ref
|
|
|
|
@liveexample{The following code shows the constructor for different @ref
|
|
|
|
value_t values,basic_json__value_t}
|
|
|
|
value_t values,basic_json__value_t}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref clear() -- restores the postcondition of this constructor
|
|
|
|
@sa see @ref clear() -- restores the postcondition of this constructor
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -1598,9 +1598,9 @@ class basic_json
|
|
|
|
@liveexample{The example below shows how JSON values are created from
|
|
|
|
@liveexample{The example below shows how JSON values are created from
|
|
|
|
initializer lists.,basic_json__list_init_t}
|
|
|
|
initializer lists.,basic_json__list_init_t}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref array(initializer_list_t) -- create a JSON array
|
|
|
|
@sa see @ref array(initializer_list_t) -- create a JSON array
|
|
|
|
value from an initializer list
|
|
|
|
value from an initializer list
|
|
|
|
@sa @ref object(initializer_list_t) -- create a JSON object
|
|
|
|
@sa see @ref object(initializer_list_t) -- create a JSON object
|
|
|
|
value from an initializer list
|
|
|
|
value from an initializer list
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -1780,9 +1780,9 @@ class basic_json
|
|
|
|
@liveexample{The following code shows an example for the `array`
|
|
|
|
@liveexample{The following code shows an example for the `array`
|
|
|
|
function.,array}
|
|
|
|
function.,array}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref basic_json(initializer_list_t, bool, value_t) --
|
|
|
|
@sa see @ref basic_json(initializer_list_t, bool, value_t) --
|
|
|
|
create a JSON value from an initializer list
|
|
|
|
create a JSON value from an initializer list
|
|
|
|
@sa @ref object(initializer_list_t) -- create a JSON object
|
|
|
|
@sa see @ref object(initializer_list_t) -- create a JSON object
|
|
|
|
value from an initializer list
|
|
|
|
value from an initializer list
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -1824,9 +1824,9 @@ class basic_json
|
|
|
|
@liveexample{The following code shows an example for the `object`
|
|
|
|
@liveexample{The following code shows an example for the `object`
|
|
|
|
function.,object}
|
|
|
|
function.,object}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref basic_json(initializer_list_t, bool, value_t) --
|
|
|
|
@sa see @ref basic_json(initializer_list_t, bool, value_t) --
|
|
|
|
create a JSON value from an initializer list
|
|
|
|
create a JSON value from an initializer list
|
|
|
|
@sa @ref array(initializer_list_t) -- create a JSON array
|
|
|
|
@sa see @ref array(initializer_list_t) -- create a JSON array
|
|
|
|
value from an initializer list
|
|
|
|
value from an initializer list
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -2325,8 +2325,8 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `type()` for all JSON
|
|
|
|
@liveexample{The following code exemplifies `type()` for all JSON
|
|
|
|
types.,type}
|
|
|
|
types.,type}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref operator value_t() -- return the type of the JSON value (implicit)
|
|
|
|
@sa see @ref operator value_t() -- return the type of the JSON value (implicit)
|
|
|
|
@sa @ref type_name() -- return the type as string
|
|
|
|
@sa see @ref type_name() -- return the type as string
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -2352,12 +2352,12 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `is_primitive()` for all JSON
|
|
|
|
@liveexample{The following code exemplifies `is_primitive()` for all JSON
|
|
|
|
types.,is_primitive}
|
|
|
|
types.,is_primitive}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref is_structured() -- returns whether JSON value is structured
|
|
|
|
@sa see @ref is_structured() -- returns whether JSON value is structured
|
|
|
|
@sa @ref is_null() -- returns whether JSON value is `null`
|
|
|
|
@sa see @ref is_null() -- returns whether JSON value is `null`
|
|
|
|
@sa @ref is_string() -- returns whether JSON value is a string
|
|
|
|
@sa see @ref is_string() -- returns whether JSON value is a string
|
|
|
|
@sa @ref is_boolean() -- returns whether JSON value is a boolean
|
|
|
|
@sa see @ref is_boolean() -- returns whether JSON value is a boolean
|
|
|
|
@sa @ref is_number() -- returns whether JSON value is a number
|
|
|
|
@sa see @ref is_number() -- returns whether JSON value is a number
|
|
|
|
@sa @ref is_binary() -- returns whether JSON value is a binary array
|
|
|
|
@sa see @ref is_binary() -- returns whether JSON value is a binary array
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -2382,9 +2382,9 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `is_structured()` for all JSON
|
|
|
|
@liveexample{The following code exemplifies `is_structured()` for all JSON
|
|
|
|
types.,is_structured}
|
|
|
|
types.,is_structured}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref is_primitive() -- returns whether value is primitive
|
|
|
|
@sa see @ref is_primitive() -- returns whether value is primitive
|
|
|
|
@sa @ref is_array() -- returns whether value is an array
|
|
|
|
@sa see @ref is_array() -- returns whether value is an array
|
|
|
|
@sa @ref is_object() -- returns whether value is an object
|
|
|
|
@sa see @ref is_object() -- returns whether value is an object
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -2454,11 +2454,11 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `is_number()` for all JSON
|
|
|
|
@liveexample{The following code exemplifies `is_number()` for all JSON
|
|
|
|
types.,is_number}
|
|
|
|
types.,is_number}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref is_number_integer() -- check if value is an integer or unsigned
|
|
|
|
@sa see @ref is_number_integer() -- check if value is an integer or unsigned
|
|
|
|
integer number
|
|
|
|
integer number
|
|
|
|
@sa @ref is_number_unsigned() -- check if value is an unsigned integer
|
|
|
|
@sa see @ref is_number_unsigned() -- check if value is an unsigned integer
|
|
|
|
number
|
|
|
|
number
|
|
|
|
@sa @ref is_number_float() -- check if value is a floating-point number
|
|
|
|
@sa see @ref is_number_float() -- check if value is a floating-point number
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -2484,10 +2484,10 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `is_number_integer()` for all
|
|
|
|
@liveexample{The following code exemplifies `is_number_integer()` for all
|
|
|
|
JSON types.,is_number_integer}
|
|
|
|
JSON types.,is_number_integer}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref is_number() -- check if value is a number
|
|
|
|
@sa see @ref is_number() -- check if value is a number
|
|
|
|
@sa @ref is_number_unsigned() -- check if value is an unsigned integer
|
|
|
|
@sa see @ref is_number_unsigned() -- check if value is an unsigned integer
|
|
|
|
number
|
|
|
|
number
|
|
|
|
@sa @ref is_number_float() -- check if value is a floating-point number
|
|
|
|
@sa see @ref is_number_float() -- check if value is a floating-point number
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -2512,10 +2512,10 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `is_number_unsigned()` for all
|
|
|
|
@liveexample{The following code exemplifies `is_number_unsigned()` for all
|
|
|
|
JSON types.,is_number_unsigned}
|
|
|
|
JSON types.,is_number_unsigned}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref is_number() -- check if value is a number
|
|
|
|
@sa see @ref is_number() -- check if value is a number
|
|
|
|
@sa @ref is_number_integer() -- check if value is an integer or unsigned
|
|
|
|
@sa see @ref is_number_integer() -- check if value is an integer or unsigned
|
|
|
|
integer number
|
|
|
|
integer number
|
|
|
|
@sa @ref is_number_float() -- check if value is a floating-point number
|
|
|
|
@sa see @ref is_number_float() -- check if value is a floating-point number
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.0
|
|
|
|
@since version 2.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -2540,9 +2540,9 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `is_number_float()` for all
|
|
|
|
@liveexample{The following code exemplifies `is_number_float()` for all
|
|
|
|
JSON types.,is_number_float}
|
|
|
|
JSON types.,is_number_float}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref is_number() -- check if value is number
|
|
|
|
@sa see @ref is_number() -- check if value is number
|
|
|
|
@sa @ref is_number_integer() -- check if value is an integer number
|
|
|
|
@sa see @ref is_number_integer() -- check if value is an integer number
|
|
|
|
@sa @ref is_number_unsigned() -- check if value is an unsigned integer
|
|
|
|
@sa see @ref is_number_unsigned() -- check if value is an unsigned integer
|
|
|
|
number
|
|
|
|
number
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -2683,8 +2683,8 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies the @ref value_t operator for
|
|
|
|
@liveexample{The following code exemplifies the @ref value_t operator for
|
|
|
|
all JSON types.,operator__value_t}
|
|
|
|
all JSON types.,operator__value_t}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref type() -- return the type of the JSON value (explicit)
|
|
|
|
@sa see @ref type() -- return the type of the JSON value (explicit)
|
|
|
|
@sa @ref type_name() -- return the type as string
|
|
|
|
@sa see @ref type_name() -- return the type as string
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3127,7 +3127,7 @@ class basic_json
|
|
|
|
`nullptr` is returned if the value and the requested pointer type does not
|
|
|
|
`nullptr` is returned if the value and the requested pointer type does not
|
|
|
|
match.,get__PointerType}
|
|
|
|
match.,get__PointerType}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref get_ptr() for explicit pointer-member access
|
|
|
|
@sa see @ref get_ptr() for explicit pointer-member access
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3249,7 +3249,7 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@throw type_error.302 if the value is not binary
|
|
|
|
@throw type_error.302 if the value is not binary
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref is_binary() to check if the value is binary
|
|
|
|
@sa see @ref is_binary() to check if the value is binary
|
|
|
|
|
|
|
|
|
|
|
|
@since version 3.8.0
|
|
|
|
@since version 3.8.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3399,9 +3399,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@complexity Logarithmic in the size of the container.
|
|
|
|
@complexity Logarithmic in the size of the container.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref operator[](const typename object_t::key_type&) for unchecked
|
|
|
|
@sa see @ref operator[](const typename object_t::key_type&) for unchecked
|
|
|
|
access by reference
|
|
|
|
access by reference
|
|
|
|
@sa @ref value() for access by value with a default value
|
|
|
|
@sa see @ref value() for access by value with a default value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
|
|
|
|
|
|
|
|
@ -3450,9 +3450,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@complexity Logarithmic in the size of the container.
|
|
|
|
@complexity Logarithmic in the size of the container.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref operator[](const typename object_t::key_type&) for unchecked
|
|
|
|
@sa see @ref operator[](const typename object_t::key_type&) for unchecked
|
|
|
|
access by reference
|
|
|
|
access by reference
|
|
|
|
@sa @ref value() for access by value with a default value
|
|
|
|
@sa see @ref value() for access by value with a default value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
|
|
|
|
|
|
|
|
@ -3584,9 +3584,9 @@ class basic_json
|
|
|
|
@liveexample{The example below shows how object elements can be read and
|
|
|
|
@liveexample{The example below shows how object elements can be read and
|
|
|
|
written using the `[]` operator.,operatorarray__key_type}
|
|
|
|
written using the `[]` operator.,operatorarray__key_type}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
@sa see @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
with range checking
|
|
|
|
with range checking
|
|
|
|
@sa @ref value() for access by value with a default value
|
|
|
|
@sa see @ref value() for access by value with a default value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3633,9 +3633,9 @@ class basic_json
|
|
|
|
@liveexample{The example below shows how object elements can be read using
|
|
|
|
@liveexample{The example below shows how object elements can be read using
|
|
|
|
the `[]` operator.,operatorarray__key_type_const}
|
|
|
|
the `[]` operator.,operatorarray__key_type_const}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
@sa see @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
with range checking
|
|
|
|
with range checking
|
|
|
|
@sa @ref value() for access by value with a default value
|
|
|
|
@sa see @ref value() for access by value with a default value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3672,9 +3672,9 @@ class basic_json
|
|
|
|
@liveexample{The example below shows how object elements can be read and
|
|
|
|
@liveexample{The example below shows how object elements can be read and
|
|
|
|
written using the `[]` operator.,operatorarray__key_type}
|
|
|
|
written using the `[]` operator.,operatorarray__key_type}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
@sa see @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
with range checking
|
|
|
|
with range checking
|
|
|
|
@sa @ref value() for access by value with a default value
|
|
|
|
@sa see @ref value() for access by value with a default value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.1.0
|
|
|
|
@since version 1.1.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3723,9 +3723,9 @@ class basic_json
|
|
|
|
@liveexample{The example below shows how object elements can be read using
|
|
|
|
@liveexample{The example below shows how object elements can be read using
|
|
|
|
the `[]` operator.,operatorarray__key_type_const}
|
|
|
|
the `[]` operator.,operatorarray__key_type_const}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
@sa see @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
with range checking
|
|
|
|
with range checking
|
|
|
|
@sa @ref value() for access by value with a default value
|
|
|
|
@sa see @ref value() for access by value with a default value
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.1.0
|
|
|
|
@since version 1.1.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3786,9 +3786,9 @@ class basic_json
|
|
|
|
@liveexample{The example below shows how object elements can be queried
|
|
|
|
@liveexample{The example below shows how object elements can be queried
|
|
|
|
with a default value.,basic_json__value}
|
|
|
|
with a default value.,basic_json__value}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
@sa see @ref at(const typename object_t::key_type&) for access by reference
|
|
|
|
with range checking
|
|
|
|
with range checking
|
|
|
|
@sa @ref operator[](const typename object_t::key_type&) for unchecked
|
|
|
|
@sa see @ref operator[](const typename object_t::key_type&) for unchecked
|
|
|
|
access by reference
|
|
|
|
access by reference
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -3863,7 +3863,7 @@ class basic_json
|
|
|
|
@liveexample{The example below shows how object elements can be queried
|
|
|
|
@liveexample{The example below shows how object elements can be queried
|
|
|
|
with a default value.,basic_json__value_ptr}
|
|
|
|
with a default value.,basic_json__value_ptr}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref operator[](const json_pointer&) for unchecked access by reference
|
|
|
|
@sa see @ref operator[](const json_pointer&) for unchecked access by reference
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.2
|
|
|
|
@since version 2.0.2
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3919,7 +3919,7 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `front()`.,front}
|
|
|
|
@liveexample{The following code shows an example for `front()`.,front}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref back() -- access the last element
|
|
|
|
@sa see @ref back() -- access the last element
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3963,7 +3963,7 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `back()`.,back}
|
|
|
|
@liveexample{The following code shows an example for `back()`.,back}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref front() -- access the first element
|
|
|
|
@sa see @ref front() -- access the first element
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4021,11 +4021,11 @@ class basic_json
|
|
|
|
@liveexample{The example shows the result of `erase()` for different JSON
|
|
|
|
@liveexample{The example shows the result of `erase()` for different JSON
|
|
|
|
types.,erase__IteratorType}
|
|
|
|
types.,erase__IteratorType}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref erase(IteratorType, IteratorType) -- removes the elements in
|
|
|
|
@sa see @ref erase(IteratorType, IteratorType) -- removes the elements in
|
|
|
|
the given range
|
|
|
|
the given range
|
|
|
|
@sa @ref erase(const typename object_t::key_type&) -- removes the element
|
|
|
|
@sa see @ref erase(const typename object_t::key_type&) -- removes the element
|
|
|
|
from an object at the given key
|
|
|
|
from an object at the given key
|
|
|
|
@sa @ref erase(const size_type) -- removes the element from an array at
|
|
|
|
@sa see @ref erase(const size_type) -- removes the element from an array at
|
|
|
|
the given index
|
|
|
|
the given index
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -4135,10 +4135,10 @@ class basic_json
|
|
|
|
@liveexample{The example shows the result of `erase()` for different JSON
|
|
|
|
@liveexample{The example shows the result of `erase()` for different JSON
|
|
|
|
types.,erase__IteratorType_IteratorType}
|
|
|
|
types.,erase__IteratorType_IteratorType}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref erase(IteratorType) -- removes the element at a given position
|
|
|
|
@sa see @ref erase(IteratorType) -- removes the element at a given position
|
|
|
|
@sa @ref erase(const typename object_t::key_type&) -- removes the element
|
|
|
|
@sa see @ref erase(const typename object_t::key_type&) -- removes the element
|
|
|
|
from an object at the given key
|
|
|
|
from an object at the given key
|
|
|
|
@sa @ref erase(const size_type) -- removes the element from an array at
|
|
|
|
@sa see @ref erase(const size_type) -- removes the element from an array at
|
|
|
|
the given index
|
|
|
|
the given index
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -4234,10 +4234,10 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The example shows the effect of `erase()`.,erase__key_type}
|
|
|
|
@liveexample{The example shows the effect of `erase()`.,erase__key_type}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref erase(IteratorType) -- removes the element at a given position
|
|
|
|
@sa see @ref erase(IteratorType) -- removes the element at a given position
|
|
|
|
@sa @ref erase(IteratorType, IteratorType) -- removes the elements in
|
|
|
|
@sa see @ref erase(IteratorType, IteratorType) -- removes the elements in
|
|
|
|
the given range
|
|
|
|
the given range
|
|
|
|
@sa @ref erase(const size_type) -- removes the element from an array at
|
|
|
|
@sa see @ref erase(const size_type) -- removes the element from an array at
|
|
|
|
the given index
|
|
|
|
the given index
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -4269,10 +4269,10 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The example shows the effect of `erase()`.,erase__size_type}
|
|
|
|
@liveexample{The example shows the effect of `erase()`.,erase__size_type}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref erase(IteratorType) -- removes the element at a given position
|
|
|
|
@sa see @ref erase(IteratorType) -- removes the element at a given position
|
|
|
|
@sa @ref erase(IteratorType, IteratorType) -- removes the elements in
|
|
|
|
@sa see @ref erase(IteratorType, IteratorType) -- removes the elements in
|
|
|
|
the given range
|
|
|
|
the given range
|
|
|
|
@sa @ref erase(const typename object_t::key_type&) -- removes the element
|
|
|
|
@sa see @ref erase(const typename object_t::key_type&) -- removes the element
|
|
|
|
from an object at the given key
|
|
|
|
from an object at the given key
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -4325,7 +4325,7 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The example shows how `find()` is used.,find__key_type}
|
|
|
|
@liveexample{The example shows how `find()` is used.,find__key_type}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref contains(KeyT&&) const -- checks whether a key exists
|
|
|
|
@sa see @ref contains(KeyT&&) const -- checks whether a key exists
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4407,8 +4407,8 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `contains()`.,contains}
|
|
|
|
@liveexample{The following code shows an example for `contains()`.,contains}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref find(KeyT&&) -- returns an iterator to an object element
|
|
|
|
@sa see @ref find(KeyT&&) -- returns an iterator to an object element
|
|
|
|
@sa @ref contains(const json_pointer&) const -- checks the existence for a JSON pointer
|
|
|
|
@sa see @ref contains(const json_pointer&) const -- checks the existence for a JSON pointer
|
|
|
|
|
|
|
|
|
|
|
|
@since version 3.6.0
|
|
|
|
@since version 3.6.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4441,7 +4441,7 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `contains()`.,contains_json_pointer}
|
|
|
|
@liveexample{The following code shows an example for `contains()`.,contains_json_pointer}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref contains(KeyT &&) const -- checks the existence of a key
|
|
|
|
@sa see @ref contains(KeyT &&) const -- checks the existence of a key
|
|
|
|
|
|
|
|
|
|
|
|
@since version 3.7.0
|
|
|
|
@since version 3.7.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4478,9 +4478,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `begin()`.,begin}
|
|
|
|
@liveexample{The following code shows an example for `begin()`.,begin}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref cbegin() -- returns a const iterator to the beginning
|
|
|
|
@sa see @ref cbegin() -- returns a const iterator to the beginning
|
|
|
|
@sa @ref end() -- returns an iterator to the end
|
|
|
|
@sa see @ref end() -- returns an iterator to the end
|
|
|
|
@sa @ref cend() -- returns a const iterator to the end
|
|
|
|
@sa see @ref cend() -- returns a const iterator to the end
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4518,9 +4518,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `cbegin()`.,cbegin}
|
|
|
|
@liveexample{The following code shows an example for `cbegin()`.,cbegin}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref begin() -- returns an iterator to the beginning
|
|
|
|
@sa see @ref begin() -- returns an iterator to the beginning
|
|
|
|
@sa @ref end() -- returns an iterator to the end
|
|
|
|
@sa see @ref end() -- returns an iterator to the end
|
|
|
|
@sa @ref cend() -- returns a const iterator to the end
|
|
|
|
@sa see @ref cend() -- returns a const iterator to the end
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4549,9 +4549,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `end()`.,end}
|
|
|
|
@liveexample{The following code shows an example for `end()`.,end}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref cend() -- returns a const iterator to the end
|
|
|
|
@sa see @ref cend() -- returns a const iterator to the end
|
|
|
|
@sa @ref begin() -- returns an iterator to the beginning
|
|
|
|
@sa see @ref begin() -- returns an iterator to the beginning
|
|
|
|
@sa @ref cbegin() -- returns a const iterator to the beginning
|
|
|
|
@sa see @ref cbegin() -- returns a const iterator to the beginning
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4589,9 +4589,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `cend()`.,cend}
|
|
|
|
@liveexample{The following code shows an example for `cend()`.,cend}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref end() -- returns an iterator to the end
|
|
|
|
@sa see @ref end() -- returns an iterator to the end
|
|
|
|
@sa @ref begin() -- returns an iterator to the beginning
|
|
|
|
@sa see @ref begin() -- returns an iterator to the beginning
|
|
|
|
@sa @ref cbegin() -- returns a const iterator to the beginning
|
|
|
|
@sa see @ref cbegin() -- returns a const iterator to the beginning
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4619,9 +4619,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `rbegin()`.,rbegin}
|
|
|
|
@liveexample{The following code shows an example for `rbegin()`.,rbegin}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref crbegin() -- returns a const reverse iterator to the beginning
|
|
|
|
@sa see @ref crbegin() -- returns a const reverse iterator to the beginning
|
|
|
|
@sa @ref rend() -- returns a reverse iterator to the end
|
|
|
|
@sa see @ref rend() -- returns a reverse iterator to the end
|
|
|
|
@sa @ref crend() -- returns a const reverse iterator to the end
|
|
|
|
@sa see @ref crend() -- returns a const reverse iterator to the end
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4656,9 +4656,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `rend()`.,rend}
|
|
|
|
@liveexample{The following code shows an example for `rend()`.,rend}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref crend() -- returns a const reverse iterator to the end
|
|
|
|
@sa see @ref crend() -- returns a const reverse iterator to the end
|
|
|
|
@sa @ref rbegin() -- returns a reverse iterator to the beginning
|
|
|
|
@sa see @ref rbegin() -- returns a reverse iterator to the beginning
|
|
|
|
@sa @ref crbegin() -- returns a const reverse iterator to the beginning
|
|
|
|
@sa see @ref crbegin() -- returns a const reverse iterator to the beginning
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4693,9 +4693,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `crbegin()`.,crbegin}
|
|
|
|
@liveexample{The following code shows an example for `crbegin()`.,crbegin}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref rbegin() -- returns a reverse iterator to the beginning
|
|
|
|
@sa see @ref rbegin() -- returns a reverse iterator to the beginning
|
|
|
|
@sa @ref rend() -- returns a reverse iterator to the end
|
|
|
|
@sa see @ref rend() -- returns a reverse iterator to the end
|
|
|
|
@sa @ref crend() -- returns a const reverse iterator to the end
|
|
|
|
@sa see @ref crend() -- returns a const reverse iterator to the end
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4722,9 +4722,9 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@liveexample{The following code shows an example for `crend()`.,crend}
|
|
|
|
@liveexample{The following code shows an example for `crend()`.,crend}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref rend() -- returns a reverse iterator to the end
|
|
|
|
@sa see @ref rend() -- returns a reverse iterator to the end
|
|
|
|
@sa @ref rbegin() -- returns a reverse iterator to the beginning
|
|
|
|
@sa see @ref rbegin() -- returns a reverse iterator to the beginning
|
|
|
|
@sa @ref crbegin() -- returns a const reverse iterator to the beginning
|
|
|
|
@sa see @ref crbegin() -- returns a const reverse iterator to the beginning
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -4935,7 +4935,7 @@ class basic_json
|
|
|
|
- The complexity is constant.
|
|
|
|
- The complexity is constant.
|
|
|
|
- Has the semantics of `begin() == end()`.
|
|
|
|
- Has the semantics of `begin() == end()`.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref size() -- returns the number of elements
|
|
|
|
@sa see @ref size() -- returns the number of elements
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -5007,8 +5007,8 @@ class basic_json
|
|
|
|
- The complexity is constant.
|
|
|
|
- The complexity is constant.
|
|
|
|
- Has the semantics of `std::distance(begin(), end())`.
|
|
|
|
- Has the semantics of `std::distance(begin(), end())`.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref empty() -- checks whether the container is empty
|
|
|
|
@sa see @ref empty() -- checks whether the container is empty
|
|
|
|
@sa @ref max_size() -- returns the maximal number of elements
|
|
|
|
@sa see @ref max_size() -- returns the maximal number of elements
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -5079,7 +5079,7 @@ class basic_json
|
|
|
|
- Has the semantics of returning `b.size()` where `b` is the largest
|
|
|
|
- Has the semantics of returning `b.size()` where `b` is the largest
|
|
|
|
possible JSON value.
|
|
|
|
possible JSON value.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref size() -- returns the number of elements
|
|
|
|
@sa see @ref size() -- returns the number of elements
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -5149,7 +5149,7 @@ class basic_json
|
|
|
|
|
|
|
|
|
|
|
|
@exceptionsafety No-throw guarantee: this function never throws exceptions.
|
|
|
|
@exceptionsafety No-throw guarantee: this function never throws exceptions.
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref basic_json(value_t) -- constructor that creates an object with the
|
|
|
|
@sa see @ref basic_json(value_t) -- constructor that creates an object with the
|
|
|
|
same value than calling `clear()`
|
|
|
|
same value than calling `clear()`
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0
|
|
|
|
@since version 1.0.0
|
|
|
|
@ -6923,8 +6923,8 @@ class basic_json
|
|
|
|
@liveexample{The following code exemplifies `type_name()` for all JSON
|
|
|
|
@liveexample{The following code exemplifies `type_name()` for all JSON
|
|
|
|
types.,type_name}
|
|
|
|
types.,type_name}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref type() -- return the type of the JSON value
|
|
|
|
@sa see @ref type() -- return the type of the JSON value
|
|
|
|
@sa @ref operator value_t() -- return the type of the JSON value (implicit)
|
|
|
|
@sa see @ref operator value_t() -- return the type of the JSON value (implicit)
|
|
|
|
|
|
|
|
|
|
|
|
@since version 1.0.0, public since 2.1.0, `const char*` and `noexcept`
|
|
|
|
@since version 1.0.0, public since 2.1.0, `const char*` and `noexcept`
|
|
|
|
since 3.0.0
|
|
|
|
since 3.0.0
|
|
|
|
@ -7060,10 +7060,10 @@ class basic_json
|
|
|
|
vector in CBOR format.,to_cbor}
|
|
|
|
vector in CBOR format.,to_cbor}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://cbor.io
|
|
|
|
@sa http://cbor.io
|
|
|
|
@sa @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
@sa see @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
analogous deserialization
|
|
|
|
analogous deserialization
|
|
|
|
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
|
|
|
|
@sa see @ref to_msgpack(const basic_json&) for the related MessagePack format
|
|
|
|
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
@sa see @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
related UBJSON format
|
|
|
|
related UBJSON format
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.9; compact representation of floating-point numbers
|
|
|
|
@since version 2.0.9; compact representation of floating-point numbers
|
|
|
|
@ -7157,9 +7157,9 @@ class basic_json
|
|
|
|
vector in MessagePack format.,to_msgpack}
|
|
|
|
vector in MessagePack format.,to_msgpack}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://msgpack.org
|
|
|
|
@sa http://msgpack.org
|
|
|
|
@sa @ref from_msgpack for the analogous deserialization
|
|
|
|
@sa see @ref from_msgpack for the analogous deserialization
|
|
|
|
@sa @ref to_cbor(const basic_json& for the related CBOR format
|
|
|
|
@sa see @ref to_cbor(const basic_json& for the related CBOR format
|
|
|
|
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
@sa see @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
related UBJSON format
|
|
|
|
related UBJSON format
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.9
|
|
|
|
@since version 2.0.9
|
|
|
|
@ -7260,10 +7260,10 @@ class basic_json
|
|
|
|
vector in UBJSON format.,to_ubjson}
|
|
|
|
vector in UBJSON format.,to_ubjson}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://ubjson.org
|
|
|
|
@sa http://ubjson.org
|
|
|
|
@sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
@sa see @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
analogous deserialization
|
|
|
|
analogous deserialization
|
|
|
|
@sa @ref to_cbor(const basic_json& for the related CBOR format
|
|
|
|
@sa see @ref to_cbor(const basic_json& for the related CBOR format
|
|
|
|
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
|
|
|
|
@sa see @ref to_msgpack(const basic_json&) for the related MessagePack format
|
|
|
|
|
|
|
|
|
|
|
|
@since version 3.1.0
|
|
|
|
@since version 3.1.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -7338,12 +7338,12 @@ class basic_json
|
|
|
|
vector in BSON format.,to_bson}
|
|
|
|
vector in BSON format.,to_bson}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://bsonspec.org/spec.html
|
|
|
|
@sa http://bsonspec.org/spec.html
|
|
|
|
@sa @ref from_bson(detail::input_adapter&&, const bool strict) for the
|
|
|
|
@sa see @ref from_bson(detail::input_adapter&&, const bool strict) for the
|
|
|
|
analogous deserialization
|
|
|
|
analogous deserialization
|
|
|
|
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
@sa see @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
related UBJSON format
|
|
|
|
related UBJSON format
|
|
|
|
@sa @ref to_cbor(const basic_json&) for the related CBOR format
|
|
|
|
@sa see @ref to_cbor(const basic_json&) for the related CBOR format
|
|
|
|
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
|
|
|
|
@sa see @ref to_msgpack(const basic_json&) for the related MessagePack format
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static std::vector<uint8_t> to_bson(const basic_json& j)
|
|
|
|
static std::vector<uint8_t> to_bson(const basic_json& j)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -7358,7 +7358,7 @@ class basic_json
|
|
|
|
@param j The JSON object to convert to BSON.
|
|
|
|
@param j The JSON object to convert to BSON.
|
|
|
|
@param o The output adapter that receives the binary BSON representation.
|
|
|
|
@param o The output adapter that receives the binary BSON representation.
|
|
|
|
@pre The input `j` shall be an object: `j.is_object() == true`
|
|
|
|
@pre The input `j` shall be an object: `j.is_object() == true`
|
|
|
|
@sa @ref to_bson(const basic_json&)
|
|
|
|
@sa see @ref to_bson(const basic_json&)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void to_bson(const basic_json& j, detail::output_adapter<uint8_t> o)
|
|
|
|
static void to_bson(const basic_json& j, detail::output_adapter<uint8_t> o)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -7465,10 +7465,10 @@ class basic_json
|
|
|
|
format to a JSON value.,from_cbor}
|
|
|
|
format to a JSON value.,from_cbor}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://cbor.io
|
|
|
|
@sa http://cbor.io
|
|
|
|
@sa @ref to_cbor(const basic_json&) for the analogous serialization
|
|
|
|
@sa see @ref to_cbor(const basic_json&) for the analogous serialization
|
|
|
|
@sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
@sa see @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
related MessagePack format
|
|
|
|
related MessagePack format
|
|
|
|
@sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
@sa see @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
related UBJSON format
|
|
|
|
related UBJSON format
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
|
|
|
|
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
|
|
|
|
@ -7606,12 +7606,12 @@ class basic_json
|
|
|
|
MessagePack format to a JSON value.,from_msgpack}
|
|
|
|
MessagePack format to a JSON value.,from_msgpack}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://msgpack.org
|
|
|
|
@sa http://msgpack.org
|
|
|
|
@sa @ref to_msgpack(const basic_json&) for the analogous serialization
|
|
|
|
@sa see @ref to_msgpack(const basic_json&) for the analogous serialization
|
|
|
|
@sa @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
@sa see @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
related CBOR format
|
|
|
|
related CBOR format
|
|
|
|
@sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
@sa see @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
the related UBJSON format
|
|
|
|
the related UBJSON format
|
|
|
|
@sa @ref from_bson(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
@sa see @ref from_bson(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
the related BSON format
|
|
|
|
the related BSON format
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
|
|
|
|
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
|
|
|
|
@ -7724,13 +7724,13 @@ class basic_json
|
|
|
|
UBJSON format to a JSON value.,from_ubjson}
|
|
|
|
UBJSON format to a JSON value.,from_ubjson}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://ubjson.org
|
|
|
|
@sa http://ubjson.org
|
|
|
|
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
@sa see @ref to_ubjson(const basic_json&, const bool, const bool) for the
|
|
|
|
analogous serialization
|
|
|
|
analogous serialization
|
|
|
|
@sa @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
@sa see @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
related CBOR format
|
|
|
|
related CBOR format
|
|
|
|
@sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
@sa see @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
the related MessagePack format
|
|
|
|
the related MessagePack format
|
|
|
|
@sa @ref from_bson(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
@sa see @ref from_bson(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
the related BSON format
|
|
|
|
the related BSON format
|
|
|
|
|
|
|
|
|
|
|
|
@since version 3.1.0; added @a allow_exceptions parameter since 3.2.0
|
|
|
|
@since version 3.1.0; added @a allow_exceptions parameter since 3.2.0
|
|
|
|
@ -7840,12 +7840,12 @@ class basic_json
|
|
|
|
BSON format to a JSON value.,from_bson}
|
|
|
|
BSON format to a JSON value.,from_bson}
|
|
|
|
|
|
|
|
|
|
|
|
@sa http://bsonspec.org/spec.html
|
|
|
|
@sa http://bsonspec.org/spec.html
|
|
|
|
@sa @ref to_bson(const basic_json&) for the analogous serialization
|
|
|
|
@sa see @ref to_bson(const basic_json&) for the analogous serialization
|
|
|
|
@sa @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
@sa see @ref from_cbor(detail::input_adapter&&, const bool, const bool, const cbor_tag_handler_t) for the
|
|
|
|
related CBOR format
|
|
|
|
related CBOR format
|
|
|
|
@sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
@sa see @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for
|
|
|
|
the related MessagePack format
|
|
|
|
the related MessagePack format
|
|
|
|
@sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
@sa see @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the
|
|
|
|
related UBJSON format
|
|
|
|
related UBJSON format
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
template<typename InputType>
|
|
|
|
template<typename InputType>
|
|
|
|
@ -8078,7 +8078,7 @@ class basic_json
|
|
|
|
@liveexample{The following code shows how a JSON object is flattened to an
|
|
|
|
@liveexample{The following code shows how a JSON object is flattened to an
|
|
|
|
object whose keys consist of JSON pointers.,flatten}
|
|
|
|
object whose keys consist of JSON pointers.,flatten}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref unflatten() for the reverse function
|
|
|
|
@sa see @ref unflatten() for the reverse function
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.0
|
|
|
|
@since version 2.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -8115,7 +8115,7 @@ class basic_json
|
|
|
|
@liveexample{The following code shows how a flattened JSON object is
|
|
|
|
@liveexample{The following code shows how a flattened JSON object is
|
|
|
|
unflattened into the original nested JSON object.,unflatten}
|
|
|
|
unflattened into the original nested JSON object.,unflatten}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref flatten() for the reverse function
|
|
|
|
@sa see @ref flatten() for the reverse function
|
|
|
|
|
|
|
|
|
|
|
|
@since version 2.0.0
|
|
|
|
@since version 2.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -8173,7 +8173,7 @@ class basic_json
|
|
|
|
@liveexample{The following code shows how a JSON patch is applied to a
|
|
|
|
@liveexample{The following code shows how a JSON patch is applied to a
|
|
|
|
value.,patch}
|
|
|
|
value.,patch}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref diff -- create a JSON patch by comparing two JSON values
|
|
|
|
@sa see @ref diff -- create a JSON patch by comparing two JSON values
|
|
|
|
|
|
|
|
|
|
|
|
@sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
|
|
|
|
@sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
|
|
|
|
@sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901)
|
|
|
|
@sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901)
|
|
|
|
@ -8468,8 +8468,8 @@ class basic_json
|
|
|
|
@liveexample{The following code shows how a JSON patch is created as a
|
|
|
|
@liveexample{The following code shows how a JSON patch is created as a
|
|
|
|
diff for two JSON values.,diff}
|
|
|
|
diff for two JSON values.,diff}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref patch -- apply a JSON patch
|
|
|
|
@sa see @ref patch -- apply a JSON patch
|
|
|
|
@sa @ref merge_patch -- apply a JSON Merge Patch
|
|
|
|
@sa see @ref merge_patch -- apply a JSON Merge Patch
|
|
|
|
|
|
|
|
|
|
|
|
@sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
|
|
|
|
@sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
|
|
|
|
|
|
|
|
|
|
|
|
@ -8646,7 +8646,7 @@ class basic_json
|
|
|
|
@liveexample{The following code shows how a JSON Merge Patch is applied to
|
|
|
|
@liveexample{The following code shows how a JSON Merge Patch is applied to
|
|
|
|
a JSON document.,merge_patch}
|
|
|
|
a JSON document.,merge_patch}
|
|
|
|
|
|
|
|
|
|
|
|
@sa @ref patch -- apply a JSON patch
|
|
|
|
@sa see @ref patch -- apply a JSON patch
|
|
|
|
@sa [RFC 7396 (JSON Merge Patch)](https://tools.ietf.org/html/rfc7396)
|
|
|
|
@sa [RFC 7396 (JSON Merge Patch)](https://tools.ietf.org/html/rfc7396)
|
|
|
|
|
|
|
|
|
|
|
|
@since version 3.0.0
|
|
|
|
@since version 3.0.0
|
|
|
|
|