////
Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
Copyright (c) 2025 Dmitry Arkhipov (grisumbras@yandex.ru)

Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Official repository: https://github.com/boostorg/json
////

[#dom]
= Document Model
In this library the following types implement containers used to represent JSON
data in memory:

.Container Types
[%autowidth]
|===
|Type|Description

| <<ref_array>>
| A sequence container of JSON values supporting dynamic size and fast, random
  access. The interface and performance characteristics are similar to
  {std_vector}.

| <<ref_object>>
| An associative container of key-value pairs with unique keys, where the key
  is a string and the mapped type is a JSON value. Search, insertion, and
  removal have average contant-time complexity. In addition, elements are
  stored contiguously in memory allowing cache-friendly iteration.

| <<ref_string>>
| A contiguous range of characters. The library assumes that the contents of
  the string holds only valid UTF-8.

| <<ref_value>>
| A special variant which can hold one of any of the six standard JSON data
  types.
|===

These containers are explored in-depth in the sections that follow.

[NOTE]
====
Sample code and identifiers used throughout are written as if the following
declarations are in effect:

[source]
----
#include <boost/json.hpp>
using namespace boost::json;
----
====

:leveloffset: +1
include::value.adoc[]
include::string.adoc[]
include::array.adoc[]
include::object.adoc[]
include::numbers.adoc[]
include::init_lists.adoc[]
include::nested_access.adoc[]
:leveloffset: -1
