BloombergLP::bdljsn::JsonObject

JSON object value providing an associative-container-like interface.

Synopsis

Declared in <bdljsn_json.h>

class JsonObject;

Description

This type is designed to replicate much of the standard associative container interface, eliding interfaces that are less relevant for a non-generic container, like hasher and comparator access, emplacement, nodes, capacity management, etc.

Type Aliases

NameDescription
ConstIterator Iterator providing non-modifiable access to members.
Iterator Iterator providing modifiable access to members.
IteratorAndStatus Pair of an iterator and a status flag returned by some insert methods.
Member Key/value pair type for members of this object.
const_iterator Iterator providing non-modifiable access to members.
const_reference Reference providing non-modifiable access to a member.
difference_type Signed type used to represent distances between iterators.
iterator Iterator providing modifiable access to members.
reference Reference providing modifiable access to a member.
size_type Unsigned type used to represent sizes and indices.
value_type Type of the members stored in this object.

Member Functions

NameDescription
JsonObject [constructor]Constructors
operator= Assignment operators
allocator Return the allocator used by this object to allocate memory.
begin begin overloads
cbegin Return a const iterator to the first member of this object.
cend Return an iterator providing non-modifiable access to the past-the-end position in the sequence of Member objects maintained by this JsonObject.
clear Remove all entries from this JsonObject. Note that this JsonObject will be empty after calling this method, but allocated memory may be retained for future use.
contains Return true if there is a Member object in this JsonObject with a key equivalent to the specified key, and return false otherwise.
empty Return true if this JsonObject contains no elements, and false otherwise.
end end overloads
erase erase overloads
find find overloads
insert insert overloads
operator[] Subscript operators
print Write this value to the specified output stream in a human-readable format.
size Return the number of elements in this JsonObject.
swap Exchange the value of this object with that of other.
operator BloombergLP::bslmf::NestedTraitDeclaration<JsonObject, HasPrintMethod> Declare that this type uses a bslma allocator.

Friends

NameDescription
BloombergLP::bdljsn::swapExchange the values of the specified a and b objects.
BloombergLP::bdljsn::operator!=Return whether lhs and rhs do not have the same value.
BloombergLP::bdljsn::operator==Return whether lhs and rhs have the same value.

Non-Member Functions

NameDescription
operator!=Same as the related overload above for operator!=.
operator==Same as the related overload above for operator==.