docs: modernize doxygen build and publish from this repository (#1711) * docs: modernize doxygen build and publish from this repository The API docs were last published to the separate jsoncpp-docs repo in January 2021 (for 1.9.4) and the local doxygen build has been broken since the versioning rework removed the top-level `version` file. Build fixes: - doxybuild.py reads the version from include/json/version.h instead of a `version` file that CMake only generates in the build directory. - doc/doxyfile.in is reduced to the non-default settings (the 2013-era 1.8.5 template triggered 17 obsolete-tag warnings on current doxygen) and now sets WARN_AS_ERROR so documentation regressions fail the build. - JSONCPP_DEPRECATED/JSON_API are stripped during preprocessing and __cplusplus=201703L is predefined, so deprecated members and the std::string_view overloads are documented. Documentation fixes: - reader.h / writer.h: a mismatched 'settings_` quote opened a backtick span that swallowed the rest of each header, leaving CharReaderBuilder and StreamWriterBuilder effectively undocumented. - value.h: document the remaining parameters of Value::get and Value::removeMember. - json_value.cpp: hide the private Value::CZString implementation from doxygen with \cond. Output: - Style with doxygen-awesome-css v2.4.2 (vendored, MIT) in place of the 1.8.13-era header/footer templates; enable tree view and search. - Use README.md as the main page; jsoncpp.dox becomes a "Quick start" page with the dead SourceForge links removed. Drop the 3-line roadmap stub and the redundant web_doxyfile.in. Publishing: - New docs workflow builds on pull requests (as a warning check) and deploys to GitHub Pages on pushes to master with a pinned, checksum-verified doxygen 1.18.0. README links now point at https://open-source-parsers.github.io/jsoncpp/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: pin workflow actions, drop fragile caller graphs zizmor requires actions pinned to commit SHAs and persist-credentials off. The caller graph for Json::Value::Value exceeded doxygen's node limit in CI, which WARN_AS_ERROR turned into a failure; caller graphs of the implementation add little to API docs, so drop them and leave headroom in DOT_GRAPH_MAX_NODES for the remaining graphs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: restrict Pages deploy to master, fix --tarball sources workflow_dispatch from a non-master branch could previously publish that branch's docs over the production site. The tarball list also still referenced NEWS.txt and version, neither of which exists in the tree. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
JsonCpp is a mature project in maintenance mode. Our priority is providing a stable, reliable JSON library for the long tail of C++ development.
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.
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.
[!NOTE] Package manager ports (vcpkg, Conan, etc.) are community-maintained. Please report outdated versions or missing generators to their respective repositories.
meson wrap install jsoncpp
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.
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.
JsonCpp is licensed under the MIT license, or public domain where recognized. See LICENSE for details.