[#BloombergLP-bdljsn-JsonObject]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::JsonObject
:relfileprefix: ../../
:mrdocs:

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

== Synopsis

Declared in `&lt;bdljsn&lowbar;json&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class JsonObject;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdljsn/JsonObject/ConstIterator.adoc[`ConstIterator`] 
| This `typedef` is an alias for `ConstIterator`&period;
| xref:BloombergLP/bdljsn/JsonObject/Iterator-05.adoc[`Iterator`] 
| This `typedef` is an alias for `Iterator`&period;
| xref:BloombergLP/bdljsn/JsonObject/IteratorAndStatus.adoc[`IteratorAndStatus`] 
| This `typedef` is an alias for `IteratorAndStatus`&period;
| xref:BloombergLP/bdljsn/JsonObject/Member.adoc[`Member`] 
| This `typedef` is an alias for `Member`&period;
| xref:BloombergLP/bdljsn/JsonObject/const_iterator.adoc[`const&lowbar;iterator`] 
| This `typedef` is an alias for `const&lowbar;iterator`&period;
| xref:BloombergLP/bdljsn/JsonObject/const_reference.adoc[`const&lowbar;reference`] 
| This `typedef` is an alias to `Container&colon;&colon;const&lowbar;reference`&period;
| xref:BloombergLP/bdljsn/JsonObject/difference_type.adoc[`difference&lowbar;type`] 
| This `typedef` is an alias to `Container&colon;&colon;difference&lowbar;type`&period;
| xref:BloombergLP/bdljsn/JsonObject/iterator-08.adoc[`iterator`] 
| This `typedef` is an alias for `iterator`&period;
| xref:BloombergLP/bdljsn/JsonObject/reference.adoc[`reference`] 
| This `typedef` is an alias for `reference`&period;
| xref:BloombergLP/bdljsn/JsonObject/size_type.adoc[`size&lowbar;type`] 
| This `typedef` is an alias for `size&lowbar;type`&period;
| xref:BloombergLP/bdljsn/JsonObject/value_type.adoc[`value&lowbar;type`] 
| This `typedef` is an alias for `value&lowbar;type`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdljsn/JsonObject/2constructor-01.adoc[`JsonObject`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdljsn/JsonObject/operator_assign-0d3.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/bdljsn/JsonObject/allocator.adoc[`allocator`] 
| Return the allocator used by this object to allocate memory&period;
| xref:BloombergLP/bdljsn/JsonObject/begin-01.adoc[`begin`] 
| `begin` overloads
| xref:BloombergLP/bdljsn/JsonObject/cbegin.adoc[`cbegin`] 
| Return an iterator providing non&hyphen;modifiable access to the first `Member` object in the sequence of `Member` objects maintained by this `JsonObject`, or the `end` iterator if this `JsonObject` is empty&period;
| xref:BloombergLP/bdljsn/JsonObject/cend.adoc[`cend`] 
| Same as the related overload above for `cend`&period;
| xref:BloombergLP/bdljsn/JsonObject/clear.adoc[`clear`] 
| Remove all entries from this `JsonObject`&period; Note that this `JsonObject` will be empty after calling this method, but allocated memory may be retained for future use&period;
| xref:BloombergLP/bdljsn/JsonObject/contains.adoc[`contains`] 
| Return `true` if there is a `Member` object in this `JsonObject` with a key equivalent to the specified `key`, and return `false` otherwise&period;
| xref:BloombergLP/bdljsn/JsonObject/empty.adoc[`empty`] 
| Return `true` if this `JsonObject` contains no elements, and `false` otherwise&period;
| xref:BloombergLP/bdljsn/JsonObject/end-00.adoc[`end`] 
| `end` overloads
| xref:BloombergLP/bdljsn/JsonObject/erase-03.adoc[`erase`] 
| `erase` overloads
| xref:BloombergLP/bdljsn/JsonObject/find-0f.adoc[`find`] 
| `find` overloads
| xref:BloombergLP/bdljsn/JsonObject/insert-032.adoc[`insert`] 
| `insert` overloads
| xref:BloombergLP/bdljsn/JsonObject/operator_subs-00.adoc[`operator&lsqb;&rsqb;`] 
| Subscript operators
| xref:BloombergLP/bdljsn/JsonObject/print.adoc[`print`] 
| Write the value of this object to the specified output `stream` in a human&hyphen;readable format, and return a reference to `stream`&period; Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects&period; If `level` is specified, optionally specify `spacesPerLevel`, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; Note that this human&hyphen;readable format is not fully specified, and can change without notice&period;
| xref:BloombergLP/bdljsn/JsonObject/size.adoc[`size`] 
| Return the number of elements in this `JsonObject`&period;
| xref:BloombergLP/bdljsn/JsonObject/swap.adoc[`swap`] 
| Exchange the value of this object with that of the specified `other` object&period; If an exception is thrown, both objects are left in valid but unspecified states&period; This operation guarantees O&lsqb;1&rsqb;complexity&period; The behavior is undefined unless this object was created with the same allocator as `other`&period;
| xref:BloombergLP/bdljsn/JsonObject/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;JsonObject, HasPrintMethod&gt;`] 
| Process the specified `object` during visitation of a `bdljsn&colon;&colon;Json` object&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdljsn/swap-085.adoc[BloombergLP::bdljsn::swap]`
| Exchange the value of the specified `a` `JsonObject` with that of the specified `b` `JsonObject`&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee&period; This operation has O&lsqb;1&rsqb;complexity if `a` was created with the same allocator as `b`&semi; otherwise, it has O&lsqb;n&plus;m&rsqb; complexity, where n and m are the number of elements in `a` and `b`, respectively&period;
| `xref:BloombergLP/bdljsn/operator_not_eq-072.adoc[BloombergLP::bdljsn::operator!&equals;]`
| Return `false` if the specified `lhs` and `rhs` objects have the same value, and `true` otherwise&period; Two `JsonObject` objects have the same value if they have the same number of `Member` objects, and for each `Member` object that is contained in `lhs` there is a key&hyphen;value pair contained in `rhs` having the same value, and vice versa&period;
| `xref:BloombergLP/bdljsn/operator_eq-0dd8.adoc[BloombergLP::bdljsn::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `JsonObject` objects have the same value if they have the same number of `Member` objects, and for each `Member` object that is contained in `lhs` there is a key&hyphen;value pair contained in `rhs` having the same value, and vice versa&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdljsn/operator_not_eq-07b.adoc[`operator!&equals;`]
| Process the specified `object` during visitation of a `bdljsn&colon;&colon;Json` object&period;
| xref:BloombergLP/bdljsn/operator_eq-048a.adoc[`operator&equals;&equals;`]
| Process the specified `object` during visitation of a `bdljsn&colon;&colon;Json` object&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
