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
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
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
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.
Boost.JSON offers these features:
The library relies heavily on these well known C++ types in its interfaces (henceforth termed standard types):
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.
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:
#define BOOST_JSON_STACK_BUFFER_SIZE 1024 #include <boost/json/src.hpp>
Boost.JSON has been tested with the following compilers:
The development infrastructure for the library includes these per-commit analyses:
As part of our commitment to producing the very finest C++ libraries that application developers can trust, the C++ Alliance has commissioned Bishop Fox to perform a security audit of the Boost.JSON library. The report is linked here:
This library wouldn't be where it is today without the help of Peter Dimov for design advice and optimization assistance.