Synopsis

Declared in <nlohmann/json.hpp>

template<>
class basic_json<>
    : public nlohmann::detail::json_base_class<void>

Base Classes

Name

Description

nlohmann::detail::json_base_class<void>

Types

Name

Description

allocator_type

the allocator type

array_t

a type for an array

binary_t

a type for a packed binary type

bjdata_version_t

how to encode BJData

boolean_t

a type for a boolean

cbor_tag_handler_t

how to treat CBOR tags

const_iterator

a const iterator for a basic_json container

const_pointer

the type of an element const pointer

const_reference

the type of an element const reference

const_reverse_iterator

a const reverse iterator for a basic_json container

default_object_comparator_t

difference_type

a type to represent differences between iterators

error_handler_t

how to treat decoding errors

exception

Classes to implement user‐defined exceptions. @{

initializer_list_t

helper type for initializer lists of basic_json values

input_format_t

invalid_iterator

iterator

an iterator for a basic_json container

json_pointer

JSON Pointer, see nlohmann::json_pointer

json_sax_t

SAX interface type, see nlohmann::json_sax

json_serializer

number_float_t

a type for a number (floating‐point)

number_integer_t

a type for a number (integer)

number_unsigned_t

a type for a number (unsigned)

object_comparator_t

object key comparator type

object_t

a type for an object

other_error

out_of_range

parse_error

parse_event_t

parser event types

parser_callback_t

per‐element parser callback type

pointer

the type of an element pointer

reference

the type of an element reference

reverse_iterator

a reverse iterator for a basic_json container

size_type

a type to represent container sizes

string_t

a type for a string

type_error

value_t

value_type

the type of elements in a basic_json container

Member Functions

Name

Description

basic_json [constructor]

Construct from nullptr_t

basic_json [constructor]

Construct from value_t

basic_json [constructor]

Construct from basic_json

basic_json [constructor]

Construct from basic_json

basic_json [constructor]

create a JSON value from an existing one

basic_json [constructor]

////////////////////////////////////

basic_json [constructor]

create a JSON value from compatible types

basic_json [constructor]

Constructor

basic_json [constructor]

construct a JSON container given an iterator range

basic_json [constructor]

~basic_json [destructor]

Destructor

operator=

Assignment operator

at

at

at

at

at

at

at

at

at

access specified object element with bounds checking

at

access specified object element with bounds checking

back

back

begin

begin

cbegin

cend

clear

contains

contains

contains

contains

check the existence of an element in a JSON object

count

count

returns the number of occurrences of a key in a JSON object

crbegin

crend

dump

emplace

add an object to an object if key does not exist

emplace_back

add an object to an array

empty

end

end

erase

erase

erase

remove element given an iterator

erase

remove element from a JSON object given a key

erase

remove elements given an iterator range

find

find

find

find an element in a JSON object

find

find an element in a JSON object

flatten

front

front

get

get a pointer value (explicit)

get

get a (pointer) value (explicit)

get_binary

get_binary

get_ptr

get a pointer value (implicit)

get_ptr

get a pointer value (implicit)

get_ref

get a reference value (implicit)

get_ref

get a reference value (implicit)

get_to

get a value (explicit)

get_to

get_to

insert

insert

insert

insert

insert

insert

insert_iterator

Helper for insertion of an iterator

is_array

is_binary

is_boolean

is_discarded

is_null

is_number

is_number_float

is_number_integer

is_number_unsigned

is_object

is_primitive

is_string

is_structured

items

items

max_size

merge_patch

operator+=

Addition assignment operator

operator+=

Addition assignment operator

operator+=

Addition assignment operator

operator+=

Addition assignment operator

operator[]

Subscript operator

operator[]

Subscript operator

operator[]

Subscript operator

operator[]

Subscript operator

operator[]

Subscript operator

operator[]

Subscript operator

operator[]

Subscript operator

operator[]

Subscript operator

operator[]

access specified object element

operator[]

access specified object element

operator[]

Subscript operator

operator[]

Subscript operator

patch

patch_inplace

push_back

push_back

push_back

push_back

rbegin

rbegin

rend

rend

size

swap

swap

swap

swap

swap

swap

type

type_name

unflatten

update

update

value

access specified object element via JSON Pointer with default value

value

access specified object element with default value

value

access specified object element via JSON Pointer with default value

value

access specified object element with default value

value

value

access specified object element with default value

value

value

access specified object element via JSON Pointer with default value

operator ValueType

get a value (implicit)

operator value_t

Conversion to value_t

operator==

comparison: equal

operator==

Equality operator

operator!=

Inequality operator

operator<=>

comparison: 3‐way

operator<=>

Three‐way comparison operator

Static Member Functions

Name

Description

accept

accept

check if the input is valid JSON

accept

check if the input is valid JSON

array

binary

binary

binary

binary

diff

from_bjdata

create a JSON value from an input in BJData format

from_bjdata

create a JSON value from an input in BJData format

from_bson

from_bson

create a JSON value from an input in BSON format

from_bson

create a JSON value from an input in BSON format

from_bson

from_cbor

from_cbor

create a JSON value from an input in CBOR format

from_cbor

create a JSON value from an input in CBOR format

from_cbor

from_msgpack

from_msgpack

create a JSON value from an input in MessagePack format

from_msgpack

create a JSON value from an input in MessagePack format

from_msgpack

from_ubjson

from_ubjson

create a JSON value from an input in UBJSON format

from_ubjson

create a JSON value from an input in UBJSON format

from_ubjson

get_allocator

iterator_wrapper

iterator_wrapper

meta

object

parse

parse

deserialize from a compatible input

parse

deserialize from a pair of character iterators

sax_parse

generate SAX events

sax_parse

generate SAX events

sax_parse

generate SAX events

to_bjdata

to_bjdata

to_bjdata

to_bson

to_bson

to_bson

to_cbor

to_cbor

to_cbor

to_msgpack

to_msgpack

to_msgpack

to_ubjson

to_ubjson

to_ubjson

Friends

Name

Description

nlohmann::operator>>

deserialize from stream

nlohmann::operator<<

deserialize from stream

nlohmann::operator>>

serialize to stream

nlohmann::operator<<

serialize to stream

nlohmann::swap

exchanges the values

nlohmann::detail::exception

general exception of the basic_json class

nlohmann::detail::serializer

nlohmann::json_pointer

JSON Pointer defines a string syntax for identifying a specific value within a JSON document

Created with MrDocs