JsonFormat
A json library with individual json object formatting support
Loading...
Searching...
No Matches
JsonFormat

A json library with individual json object formatting support

How to use

  1. Add the library as a submodule
    mkdir -p thirdparty
    cd thirdparty
    git submodule add --depth 1 https://github.com/SemkiShow/JsonFormat
    cd ..
  2. Add JsonFormat to your CMakeLists.txt
    add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/JsonFormat ${CMAKE_BINARY_DIR}/_deps/JsonFormat-build SYSTEM)

CMake options

Option name Purpose
JSON_FORMAT_STRICT_ERRORS Get*() functions throw an error instead of returning 0 on a null object
JSON_FORMAT_BUILD_TESTS Build tests. Run git submodule update --init --recursive --depth 1 after cloning to download googletest which is required for tests

Examples

  1. Run
    git clone https://github.com/SemkiShow/JsonFormat
    cd JsonFormat/examples
    chmod +x run.sh
    ./run.sh --help # See what examples are available
    ./run.sh <example-name>

Documentation

Documentation is available here