A C++ library for interacting with JSON.
  • C++ 81.7%
  • Python 10.8%
  • CMake 4.8%
  • Meson 0.9%
  • C 0.8%
  • Other 1%
Find a file
Mohd Quamar Tyagi 93acc7b155
Fix missing prototype for newlineScanByteCountForTesting (#1720)
Closes #1705. Adds explicit prototype declaration for
newlineScanByteCountForTesting() to prevent compiler errors when
building with -Wmissing-prototypes.

Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2026-10-26 08:53:47 -07:00
.github docs: modernize doxygen build and publish from this repository (#1711) 2026-08-20 15:44:45 -07:00
cmake Fix generation of pkg-config file with absolute includedir/libdir. (#1199) 2020-07-20 20:36:30 +08:00
devtools the cgi module was removed from Python3.13 (#1578) 2024-12-02 23:00:25 -08:00
doc docs: modernize doxygen build and publish from this repository (#1711) 2026-08-20 15:44:45 -07:00
example Fix C++11 ABI breakage when compiled with C++17 #1668 (#1675) 2026-04-09 10:37:08 -07:00
include docs: modernize doxygen build and publish from this repository (#1711) 2026-08-20 15:44:45 -07:00
pkg-config Fixed pkg-config Version 2021-02-03 13:40:56 -06:00
src Fix missing prototype for newlineScanByteCountForTesting (#1720) 2026-10-26 08:53:47 -07:00
test Update bazel config for 9.x (#1655) 2026-03-16 13:09:40 -07:00
.clang-format add comment space directive (#1558) 2024-09-09 16:30:33 -07:00
.clang-tidy Remove deprecated/removed clang-tidy key AnalyzeTemporaryDtors (#1614) (#1615) 2025-11-12 00:10:33 -08:00
.gitattributes add .gitattributes 2015-08-09 16:25:36 -07:00
.gitignore Set up for Bazel module builds. (#1597) 2025-03-12 15:57:16 -07:00
amalgamate.py Update link in amalgamate.py (#1335) 2024-09-09 18:43:32 -07:00
appveyor.yml ENH: Prevent cmake in source builds (#1091) 2020-11-06 13:35:51 -08:00
AUTHORS Drop pre-C++11 alternatives (#1593) 2025-01-10 15:17:00 -08:00
BUILD.bazel Update bazel config for 9.x (#1655) 2026-03-16 13:09:40 -07:00
CMakeLists.txt fix: bump SOVERSION to 28 for the removed std::string_view symbols (#1694) (#1697) 2026-06-17 01:07:12 -07:00
CONTRIBUTING.md Fix various typos (#1350) 2021-12-14 18:04:47 -08:00
CTestConfig.cmake ENH: Refactor and enhance the CI testing infrastructure 2019-01-14 16:12:43 -06:00
dev.makefile Update version in dox 2021-01-10 00:18:59 -06:00
doxybuild.py docs: modernize doxygen build and publish from this repository (#1711) 2026-08-20 15:44:45 -07:00
gcovr.cfg Remove build directory exclusion from gcovr config (#1640) 2026-03-02 17:37:00 -08:00
get_version.pl Update version in dox 2021-01-10 00:18:59 -06:00
jsoncpp-namespaced-targets.cmake Protect target JsonCpp::JsonCpp against multi-include (#1435) 2024-09-09 20:02:24 -07:00
jsoncppConfig.cmake.in Fix CMake 4.0 compatibility in jsoncppConfig.cmake.in (#1671) 2026-04-07 20:29:23 -07:00
jsoncppConfig.cmake.meson.in fix(build): remove check_required_components for meson build (#1570) 2024-09-30 15:23:00 -07:00
LICENSE Remove trailing space characters (#1256) 2021-01-09 22:39:07 -06:00
meson.build fix: bump SOVERSION to 28 for the removed std::string_view symbols (#1694) (#1697) 2026-06-17 01:07:12 -07:00
meson_options.txt Meson updates (#1124) 2020-01-07 09:23:50 +08:00
MODULE.bazel fix: make array operator[] dense when assigning past the end (#1611) (#1693) 2026-06-16 14:40:21 -07:00
README.md docs: modernize doxygen build and publish from this repository (#1711) 2026-08-20 15:44:45 -07:00
reformat.sh Improve formatting (#1680) 2026-04-23 16:34:58 -07:00
SECURITY.md Add security policy (#1484) 2024-09-09 18:53:23 -07:00
version.in Fix uninitialized CMake variable in version.in (#1658) 2026-03-15 16:33:53 -07:00

JsonCpp

Conan Center badge badge Coverage Status

JSON is a lightweight data-interchange format. It can represent numbers, strings, ordered sequences of values, and collections of name/value pairs.

JsonCpp is a C++ library that allows manipulating JSON values, including serialization and deserialization to and from strings. It can also preserve existing comment in deserialization/serialization steps, making it a convenient format to store user input files.

Project Status

JsonCpp is a mature project in maintenance mode. Our priority is providing a stable, reliable JSON library for the long tail of C++ development.

Current Focus

  • Security: Addressing vulnerabilities and fuzzing results.
  • Compatibility: Ensuring the library builds without warnings on the latest versions of GCC, Clang, and MSVC.
  • Reliability: Fixing regressions and critical logical bugs.

Out of Scope

  • Performance: We are not competing with SIMD-accelerated or reflection-based parsers.
  • Features: We are generally not accepting requests for new data formats or major API changes.

JsonCpp remains a primary choice for developers who require comment preservation and support for legacy toolchains where modern C++ standards are unavailable. The library is intended to be a reliable dependency that does not require frequent updates or major migration efforts.

A note on backward-compatibility

  • 1.y.z (master): Actively maintained. Requires C++11.

  • 0.y.z: Legacy support for pre-C++11 compilers. Maintenance is limited to critical security fixes.

  • 00.11.z: Discontinued.

Major versions maintain binary compatibility. Critical security fixes are accepted for both the master and 0.y.z branches.

Integration

Note

Package manager ports (vcpkg, Conan, etc.) are community-maintained. Please report outdated versions or missing generators to their respective repositories.

Meson

meson wrap install jsoncpp

Amalgamated source

For projects requiring a single-header approach, JsonCpp provides a script to generate an amalgamated source and header file.

You can generate the amalgamated files by running the following Python script from the top-level directory:

python3 amalgamate.py

This will generate a dist directory containing jsoncpp.cpp, json/json.h, and json/json-forwards.h. You can then drop these files directly into your project's source tree and compile jsoncpp.cpp alongside your other source files.

Documentation

The API reference is generated with Doxygen from the master branch on every push. To build it locally, run python3 doxybuild.py --open from the top-level directory (see doc/readme.txt). Additional information is available on the Project Wiki.

License

JsonCpp is licensed under the MIT license, or public domain where recognized. See LICENSE for details.