en	https://www.boost.org/doc/libs/release/libs/json/[image:https://raw.githubusercontent.com/CPPAlliance/json/master/doc/images/repo-logo-3.png[Boost.JSON]]

en	Branch

en	https://github.com/boostorg/json/tree/master[`master`]

en	https://github.com/boostorg/json/tree/develop[`develop`]

en	https://azure.microsoft.com/en-us/services/devops/pipelines/[Azure]

en	https://vinniefalco.visualstudio.com/json/_build/latest?definitionId=5&branchName=master[image:https://img.shields.io/azure-devops/build/vinniefalco/2571d415-8cc8-4120-a762-c03a8eda0659/8/master[Build

en	Status]] |https://vinniefalco.visualstudio.com/json/_build/latest?definitionId=8&branchName=develop[image:https://img.shields.io/azure-devops/build/vinniefalco/2571d415-8cc8-4120-a762-c03a8eda0659/8/develop[Build Status]]

en	Docs

en	https://www.boost.org/doc/libs/master/libs/json/[image:https://img.shields.io/badge/docs-master-brightgreen.svg[Documentation]]

en	https://www.boost.org/doc/libs/develop/libs/json/[image:https://img.shields.io/badge/docs-develop-brightgreen.svg[Documentation]]

en	https://drone.io/[Drone]

en	https://drone.cpp.al/boostorg/json[image:https://drone.cpp.al/api/badges/boostorg/json/status.svg?ref=refs/heads/master[Build

en	Status]] |https://drone.cpp.al/boostorg/json[image:https://drone.cpp.al/api/badges/boostorg/json/status.svg?ref=refs/heads/develop[Build Status]]

en	Matrix

en	http://www.boost.org/development/tests/master/developer/json.html[image:https://img.shields.io/badge/matrix-master-brightgreen.svg[Matrix]]

en	http://www.boost.org/development/tests/develop/developer/json.html[image:https://img.shields.io/badge/matrix-develop-brightgreen.svg[Matrix]]

en	Fuzzing

en	—

en	https://github.com/boostorg/json/actions?query=workflow%3Afuzz+branch%3Adevelop[image:https://github.com/boostorg/json/workflows/fuzz/badge.svg?branch=develop[fuzz]]

en	https://ci.appveyor.com/[Appveyor]

en	https://ci.appveyor.com/project/vinniefalco/cppalliance-json/branch/master[image:https://ci.appveyor.com/api/projects/status/8csswcnmfm798203?branch=master&svg=true[Build

en	status]] |https://ci.appveyor.com/project/vinniefalco/cppalliance-json/branch/develop[image:https://ci.appveyor.com/api/projects/status/8csswcnmfm798203?branch=develop&svg=true[Build status]]

en	https://codecov.io[codecov.io]

en	https://codecov.io/gh/boostorg/json/branch/master[image:https://codecov.io/gh/boostorg/json/branch/master/graph/badge.svg[codecov]]

en	https://codecov.io/gh/boostorg/json/branch/develop[image:https://codecov.io/gh/boostorg/json/branch/develop/graph/badge.svg[codecov]]

en	Boost.JSON

en	Overview

en	Boost.JSON is a portable C++ library which provides containers and algorithms that implement https://json.org/[JavaScript Object Notation], or simply ``JSON'', a lightweight data-interchange format. This format is easy for humans to read and write, and easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language (https://www.ecma-international.org/ecma-262/10.0/index.html[Standard ECMA-262]), and is currently standardised in https://datatracker.ietf.org/doc/html/rfc8259[RFC 8259]. JSON is a text format that is language-independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

en	This library focuses on a common and popular use-case: parsing and serializing to and from a container called `value` which holds JSON types. Any `value` which you build can be serialized and then deserialized, guaranteeing that the result will be equal to the original value. Whatever JSON output you produce with this library will be readable by most common JSON implementations in any language.

en	The `value` container is designed to be well suited as a vocabulary type appropriate for use in public interfaces and libraries, allowing them to be composed. The library restricts the representable data types to the ranges which are almost universally accepted by most JSON implementations, especially JavaScript. The parser and serializer are both highly performant, meeting or exceeding the benchmark performance of the best comparable libraries. Allocators are very well supported. Code which uses these types will be easy to understand, flexible, and performant.

en	Boost.JSON offers these features:

en	Fast compilation

en	Require only C++11

en	Fast streaming parser and serializer

en	Constant-time key lookup for objects

en	Options to allow non-standard JSON

en	Easy and safe modern API with allocator support

en	Optional header-only, without linking to a library

en	Visit https://boost.org/libs/json for complete documentation.

en	Requirements

en	Requires only C++11

en	Link to a built static or dynamic Boost library, or use header-only

en	(see below)

en	Supports -fno-exceptions, detected automatically

en	The library relies heavily on these well known C++ types in its interfaces (henceforth termed _standard types_):

en	`string_view`

en	`memory_resource`, `polymorphic_allocator`

en	`error_category`, `error_code`, `error_condition`, `system_error`

en	Header-Only

en	To use as header-only; that is, to eliminate the requirement to link a program to a static or dynamic Boost.JSON library, simply place the following line in exactly one new or existing source file in your project.

en	MSVC users must also define the macro `BOOST_JSON_NO_LIB` to disable auto-linking.

en	Embedded

en	Boost.JSON works great on embedded devices. The library uses local stack buffers to increase the performance of some operations. On Intel platforms these buffers are large (4KB), while on non-Intel platforms they are small (256 bytes). To adjust the size of the stack buffers for embedded applications define this macro when building the library or including the function definitions:

en	Supported Compilers

en	Boost.JSON has been tested with the following compilers:

en	clang: 3.5, 3.6, 3.7, 3.8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

en	gcc: 4.8, 4.9, 5, 6, 7, 8, 9, 10, 11, 12

en	msvc: 14.0, 14.1, 14.2, 14.3

en	Supported JSON Text

en	The library expects input text to be encoded using UTF-8, which is a requirement put on all JSON exchanged between systems by the https://datatracker.ietf.org/doc/html/rfc8259#section-8.1[RFC]. Similarly, the text generated by the library is valid UTF-8.

en	The RFC does not allow byte order marks (BOM) to appear in JSON text, so the library considers BOM syntax errors.

en	The library supports several popular JSON extensions. These have to be explicitly enabled.

en	Visual Studio Solution

en	Quality Assurance

en	The development infrastructure for the library includes these per-commit analyses:

en	Coverage reports

en	Benchmark performance comparisons

en	Compilation and tests on Drone.io, Azure Pipelines, Appveyor

en	Fuzzing using clang-llvm and machine learning

en	License

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