open-source-parsers /jsoncpp
A C++ library for interacting with JSON.
★ 8,914⑂ 2,738👁 320⑃ 834● 832▤ 66
+2
Daily
8,914
stars
2,738
forks
320
watchers
834
prs
832
issues
66
releases
README
JsonCpp [JSON][json-org] is a lightweight data-interchange format. It can represent numbers, strings, ordered sequences of values, and collections of name/value pairs. [json-org]: http://json.org/ 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 sh 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: sh 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.
Top issues
#1202Keep order of fields as they are added, not sorting alphabetically21 comments · 2020-07-09#1361isDouble() returns true for integer number.16 comments · 2021-12-10#801Access violation during getFormattedErrorMessages, if Parser read JSON from stream9 comments · 2018-07-02#1451Avoid setting global CMake directories8 comments · 2022-12-04#1137Make Json::Value(std::string) etc... explicit8 comments · 2020-02-06#618Accessing file location from Json::Value7 comments · 2017-05-28#439Parsing breaks because it is locale sensitive7 comments · 2016-03-09#1422Change signature of newCharReader to return uniqu_ptr5 comments · 2022-07-23
Discussions
#1638Clone and make older version1 comments · 2026-02-25#1610why should i rebuild my app when a new version of jsoncpp rpm package is released1 comments · 2025-05-28#1580Disable test_* generation with FetchContent1 comments · 2024-11-26#1576Turn off sorting0 comments · 2024-11-06#1544Is it still maintained?1 comments · 2024-07-02#1542no decrease in memory usage after JSON::Value object goes out of scope1 comments · 2024-06-26#1538Settings for StreamWriterBuilder to replace StyledWriter0 comments · 2024-06-10#1514https://github.com/open-source-parsers/jsoncpp.wiki.git0 comments · 2023-09-27
Latest release
1.9.8 1.9.8 2026-06-14What's Changed Update to 1.9.8, remove qualifier from version string by @baylesj in https://github.com/open-source-parsers/jsoncpp/pull/1666 Revert soversion change by @baylesj in https://github.com/open-source-parsers/jsoncpp/pull/1667 prevent macro redefined for JSON_HAS_INT64 by @anandolee in https://github.com/open-source-parsers/jsoncpp/pull/1673 ci: suppress Node 20 deprecation and missing python-version warnings by @baylesj in https://github.com/open-source-parsers/jsoncpp/pull/1674 Fix C++11 ABI breakage when compiled with C++17 1668 by @baylesj in https://github.com/open-sou