Skip to content

cppalliance-bot/json

 
 

Repository files navigation

Boost.JSON Title

Branch Travis Appveyor Azure Pipelines codecov.io Docs Matrix
master Build Status Build status Build Status codecov Documentation Matrix
develop Build Status Build status Build Status codecov Documentation Matrix

Boost.JSON

This is currently NOT an official Boost library.

Introduction

This library provides containers and algorithms which implement JSON ("JavaScript Object Notation"), 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, Standard ECMA-262. JSON is a text format that is language-indepdent 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.

Motivation

A survey of existing JSON libraries shows impressive diversity and features. However, no library is known to meet all of the design goals mentioned here. In particular, we know of no library that supports incremental parsing and serialization, and also supports custom allocators robustly.

Design Goals

There are an overwhelming number of JSON libraries. A common theme throughout is an emphasis on parsing performance or feature richness. This library uses a different approach: it provides a carefully designed JSON container, value, engineered from the ground up to be ideally suited as a vocabulary type. In particular it provides an interface which is stable, lightweight, and appropriate for use as parameter or return types in public interfaces.

The design of the library also achieves these goals:

  • Requires only C++11.
  • Support stateful allocators.
  • Top performance of general libraries.
  • Uniform interface on all C++ versions.
  • Key lookup in objects has constant average complexity.
  • Strict parser and serializer which work incrementally.
  • Security-aware treatment of untrusted inputs.
  • Fast compilation performance.

CMake

cmake -G "Visual Studio 16 2019" -A Win32 -B bin -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/msvc.cmake
cmake -G "Visual Studio 16 2019" -A x64 -B bin64 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/msvc.cmake

License

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)

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.8%
  • HTML 1.9%
  • Other 1.3%