Boost.JSON Logo

PrevUpHomeNext

value

The type used to represent any JSON value.

Synopsis

Defined in header <boost/json/value.hpp>

class value
Member Functions

Name

Description

as_array

Return a reference to the underlying array, or throw an exception.

as_bool

Return a reference to the underlying bool, or throw an exception.

Return the underlying bool, or throw an exception.

as_double

Return a reference to the underlying double, or throw an exception.

Return the underlying double, or throw an exception.

as_int64

Return a reference to the underlying std::int64_t, or throw an exception.

Return the underlying std::int64_t, or throw an exception.

as_object

Return a reference to the underlying object, or throw an exception.

as_string

Return a reference to the underlying string, or throw an exception.

as_uint64

Return a reference to the underlying std::uint64_t, or throw an exception.

Return the underlying std::uint64_t, or throw an exception.

at

Access an element, with bounds checking.

emplace_array

Return a reference to an array, changing the kind and replacing the contents.

emplace_bool

Return a reference to a bool, changing the kind and replacing the contents.

emplace_double

Return a reference to a double, changing the kind and replacing the contents.

emplace_int64

Return a reference to a std::int64_t, changing the kind and replacing the contents.

emplace_null

Change the kind to null, discarding the previous contents.

emplace_object

Return a reference to an object, changing the kind and replacing the contents.

emplace_string

Return a reference to a string, changing the kind and replacing the contents.

emplace_uint64

Return a reference to a std::uint64_t, changing the kind and replacing the contents.

get_array

Return a reference to the underlying array, without checking.

get_bool

Return a reference to the underlying bool, without checking.

Return the underlying bool, without checking.

get_double

Return a reference to the underlying double, without checking.

Return the underlying double, without checking.

get_int64

Return a reference to the underlying std::int64_t, without checking.

Return the underlying std::int64_t, without checking.

get_object

Return a reference to the underlying object, without checking.

get_string

Return a reference to the underlying string, without checking.

get_uint64

Return a reference to the underlying std::uint64_t, without checking.

Return the underlying std::uint64_t, without checking.

if_array

Return a pointer to the underlying array, or nullptr.

if_bool

Return a pointer to the underlying bool, or nullptr.

if_double

Return a pointer to the underlying double, or nullptr.

if_int64

Return a pointer to the underlying std::int64, or nullptr.

if_object

Return a pointer to the underlying object, or nullptr.

if_string

Return a pointer to the underlying string, or nullptr.

if_uint64

Return a pointer to the underlying std::uint64, or nullptr.

is_array

Returns true if this is an array.

is_bool

Returns true if this is a bool.

is_double

Returns true if this is a double.

is_int64

Returns true if this is a std::int64_t.

is_null

Returns true if this is a null.

is_number

Returns true if this is a number.

is_object

Returns true if this is an object.

is_primitive

Returns true if this is not an array or object.

is_string

Returns true if this is a string.

is_structured

Returns true if this is an array or object.

is_uint64

Returns true if this is a std::uint64_t.

kind

Returns the kind of this JSON value.

operator=

Move assignment.

Copy assignment operator.

Assign an object or array.

Assignment.

storage

Return the storage associated with the value.

swap

Swap the contents.

value

Default constructor.

Constructor.

Pilfer constructor.

Copy constructor.

Move constructor.

Construct an object.

Construct an array.

Construct a string.

Construct a std::int64_t.

Construct a std::uint64_t.

Construct a double.

Construct a bool.

Construct a null.

Construct an object or array.

~value

Destructor.

Description
Thread Safety:

Distinct instances may be accessed concurrently. Non-const member functions of a shared instance may not be called concurrently with any other member functions of that instance.

Convenience header <boost/json.hpp>


PrevUpHomeNext