...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A dynamically sized associative container of JSON key/value pairs.
Defined in header <boost/json/object.hpp>
class object
Name |
Description |
---|---|
The type of Allocator returned by |
|
A const random access iterator to an element. |
|
A const pointer to an element. |
|
A const reference to an element. |
|
A const reverse random access iterator to an element. |
|
The type used to represent signed integers. |
|
A random access iterator to an element. |
|
The type of keys. |
|
The type of mapped values. |
|
A pointer to an element. |
|
A reference to an element. |
|
A reverse random access iterator to an element. |
|
The type used to represent unsigned integers. |
|
The element type. |
Name |
Description |
---|---|
Access the specified element, with bounds checking. |
|
Return an iterator to the first element. |
|
Return the number of elements that can be held in currently allocated memory. |
|
Return a const iterator to the first element. |
|
Return a const iterator to the element following the last element. |
|
Erase all elements. |
|
Return |
|
Count the number of elements with a specific key. |
|
Return a const reverse iterator to the first element of the reversed container. |
|
Return a const reverse iterator to the element following the last element of the reversed container. |
|
Construct an element in-place. |
|
Return whether there are no elements. |
|
Return an iterator to the element following the last element. |
|
Erase an element. |
|
Find an element with a specific key. |
|
Return the associated |
|
Return a pointer to the value if the key is found, or null. |
|
Insert elements. |
|
Insert an element or assign to the current element if the key already exists. |
|
object [constructor] |
Default constructor. |
Copy assignment. |
|
Access or insert the specified element. |
|
Return a reverse iterator to the first element of the reversed
container. |
|
Return a reverse iterator to the element following the last element
of the reversed container. |
|
Increase the capacity to at least a certain amount. |
|
Return the number of elements. |
|
Erase an element preserving order. |
|
Return the associated |
|
Swap two objects. |
|
~object [destructor] |
Destructor. |
Name |
Description |
---|---|
Return the maximum number of elements any object can hold. |
Name |
Description |
---|---|
Return |
|
Return |
|
Serialize |
|
Swap two objects. |
This is an associative container whose elements are key/value pairs with unique keys.
The elements are stored contiguously; iterators are ordinary pointers, allowing random access pointer arithmetic for retrieving elements. In addition, the container maintains an internal index to speed up find operations, reducing the average complexity for most lookups and insertions.
Reallocations are usually costly operations in terms of performance, as elements
are copied and the internal index must be rebuilt. The reserve
function can be used to
eliminate reallocations if the number of elements is known beforehand.
All elements stored in the container, and their children if any, will use the same memory resource that was used to construct the container.
Non-const member functions may not be called concurrently with any other member functions.
ContiguousContainer, ReversibleContainer, and SequenceContainer.
Convenience header <boost/json.hpp>