-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Amalgamated Source
Jordan Bayles edited this page May 5, 2026
·
2 revisions
JsonCpp provides a script to generate an amalgamated source and header file. This is useful for projects that want to include JsonCpp without adding it as a full dependency or build system integration.
You can generate the amalgamated files by running the following Python script from the top-level directory of the JsonCpp source tree:
python3 amalgamate.pyThis will create a dist directory containing:
-
jsoncpp.cpp: The complete source code. -
json/json.h: The complete header file. -
json/json-forwards.h: Forward declarations.
To use the amalgamated source in your project:
- Copy the
distdirectory contents into your project's source tree. - Add
jsoncpp.cppto your build system's source files. - Ensure your include paths are set up so that
#include "json/json.h"works.
For more information, see the README.