Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 68cc668162.
PrevUpHomeNext

Document Model

In this library the following types implement containers used to represent JSON data in memory:

Table 1.1. Container Types

Type

Description

array

A sequence container of JSON values supporting dynamic size and fast, random access. The interface and performance characteristics are similar to std::vector.

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.

string

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

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] Note

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

#include <boost/json.hpp>
using namespace boost::json;

PrevUpHomeNext