A C++ library for interacting with JSON.

JsonCpp

badge 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 unserialization/serialization steps, making it a convenient format to store user input files.

Documentation

JsonCpp documentation is generated using Doxygen.

A note on backward-compatibility

  • 1.y.z is built with C++11.
  • 0.y.z can be used with older compilers.
  • 00.11.z can be used both in old and new compilers.
  • Major versions maintain binary-compatibility.

Special note

The branch 00.11.zis a new branch, its major version number 00 is to show that it is different from 0.y.z and 1.y.z, the main purpose of this branch is to make a balance between the other two branches. Thus, users can use some new features in this new branch that introduced in 1.y.z, but can hardly applied into 0.y.z.

Using JsonCpp in your project

The vcpkg dependency manager

You can download and install JsonCpp using the vcpkg dependency manager:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install jsoncpp

The JsonCpp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Amalgamated source

https://github.com/open-source-parsers/jsoncpp/wiki/Amalgamated-(Possibly-outdated)

The Meson Build System

If you are using the Meson Build System, then you can get a wrap file by downloading it from Meson WrapDB, or simply use meson wrap install jsoncpp.

Other ways

If you have trouble, see the Wiki, or post a question as an Issue.

License

See the LICENSE file for details. In summary, JsonCpp is licensed under the MIT license, or public domain if desired and recognized in your jurisdiction.

Comments
  • Use a consistent target name for jsoncpp in CMake scripts

    Use a consistent target name for jsoncpp in CMake scripts

    The target name for the jsoncpp library would change based on whether we were building a static or shared library. This inconsistency made it difficult and unintuitive to pull in jsoncpp as a submodule in another repository and link to it directly via other CMake scripts.

    Having a consistent target name will allow libraries with their own CMake scripts to reliably refer to jsoncpp as a dependency. Example CMake script below shows how I would refer to jsoncpp as a dependency in my own parent project. Note that jsoncpp in this case is a submodule in my git repository.

    set( project_name my-project )
    
    project( ${project_name} )
    
    set( sources
        main.cpp
    )
    
    add_subdirectory( jsoncpp )
    
    add_executable( ${project_name} ${sources} )
    target_link_libraries( ${project_name} PRIVATE jsoncpp )
    

    Other Changes:

    • BUILD_SHARED_LIBS and BUILD_STATIC_LIBS removed in favor of JSONCPP_LIBRARY_TYPE, which allows you to pick either SHARED or STATIC library variations. This change was made to prevent both shared and static libraries being built at the same time. This isn't allowed anymore since we only generate 1 target for the jsoncpp library now.
    • Clean up closing statements for if conditions, functions, macros, and other entities. Newer versions of CMake do not require you to redundantly respecify the parameters to the opening arguments.
    • travis.sh build script updated to perform CMake generation in an out-of-source binary directory. This will prevent the temporary generated output files from intermixing into the source tree and allow for multiple generations with different configurations using the same source tree.
  • Building SHARED and STATIC library

    Building SHARED and STATIC library

    As I can see, it is currently not possible to build both versions, correct?

    Would a PR that offers this functionality be merged? I want to package a more recent version for debian, which requires .a and .so version of it.

  • Bug: can't create array more than 5 items

    Bug: can't create array more than 5 items

    test code is:

        int count = 5;
        Json::Value root;
        Json::Value item;
        root["array"] = Json::Value::nullRef;
        for (int i = 0; i < count; i++)
        {
            item["a"] = i;
            item["b"] = i;
            root["array"][i] = item;
        }
    

    the above code's result is wrong,

    {
       "array" : [
          {
             "a" : 0,
             "b" : 0
          }
       ]
    }
    

    but if when the count = 4, then the result is right:

    {
       "array" : [
          {
             "a" : 0,
             "b" : 0
          },
          {
             "a" : 1,
             "b" : 1
          },
          {
             "a" : 2,
             "b" : 2
          },
          {
             "a" : 3,
             "b" : 3
          }
       ]
    }
    
  • Fix non-rvalue Json::Value assignment operator (should copy, not move)

    Fix non-rvalue Json::Value assignment operator (should copy, not move)

    Pull request #635 has changed the behavior of non-rvalue assignment operator from copying the 'other' value to swapping with it. There is a lot of wrong with it.

    This pull request reverts to the earlier assignment operator, with 'other' passed by value rather than const&. Now that Json::Value has a move constructor, such assignment operator covers both move and non-move cases.

  • Memory leak issue in jsoncpp ver 0.10.7(0.y.z)

    Memory leak issue in jsoncpp ver 0.10.7(0.y.z)

    We tried to feed 128KB data in JSON parser API , which took almost 2MB of memory .

    Please find the below code for your reference ,

    if(!reader.parse(buf, root)) { return false; }

    Could you please provide your input on this .

    Thanks & Regards, Subitha.P

  • Failing ValueTest/integers unit test (32-bit gcc Linux RelWithDebInfo)

    Failing ValueTest/integers unit test (32-bit gcc Linux RelWithDebInfo)

    I'm building with CMake and getting the following error from the unit tests:

    Testing ValueTest/checkNormalizeFloatingPointStr: OK
    Testing ValueTest/memberCount: OK
    Testing ValueTest/objects: OK
    Testing ValueTest/arrays: OK
    Testing ValueTest/null: OK
    Testing ValueTest/strings: OK
    Testing ValueTest/bools: OK
    Testing ValueTest/integers: FAILED
    Testing ValueTest/nonIntegers: OK
    Testing ValueTest/compareNull: OK
    Testing ValueTest/compareInt: OK
    Testing ValueTest/compareUInt: OK
    Testing ValueTest/compareDouble: OK
    Testing ValueTest/compareString: OK
    Testing ValueTest/compareBoolean: OK
    Testing ValueTest/compareArray: OK
    Testing ValueTest/compareObject: OK
    Testing ValueTest/compareType: OK
    Testing ValueTest/offsetAccessors: OK
    Testing ValueTest/typeChecksThrowExceptions: OK
    Testing ReaderTest/parseWithNoErrors: OK
    Testing ReaderTest/parseWithNoErrorsTestingOffsets: OK
    Testing ReaderTest/parseWithOneError: OK
    Testing ReaderTest/parseChineseWithOneError: OK
    Testing ReaderTest/parseWithDetailError: OK
    Testing WriterTest/dropNullPlaceholders: OK
    * Detail of ValueTest/integers test failure:
    /home/eric/Development/jsoncpp/src/test_lib_json/main.cpp(664): kfint32max == val.asFloat()
      Expected: 2147483648
      Actual  : 2147483648
    25/26 tests passed (1 failure(s))
    make[2]: *** [jsoncpp/bin/jsoncpp_test] Error 1
    make[1]: *** [jsoncpp/src/test_lib_json/CMakeFiles/jsoncpp_test.dir/all] Error 2
    make: *** [all] Error 2
    

    Is this an issue in the code or maybe specific to my setup?

  • GCC6 Support

    GCC6 Support

    Hi!

    At Debian we are currently preparing the migration to GCC6. The following issues are currently affecting libjsoncpp.

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811958

    Could you take a look at it?

  • move ctors

    move ctors

    • Add move constructor to Value::CZString
    • Add unit test for Value move constructor
    • Allow includer to specify in advance the value for JSON_HAS_RVALUE_REFERENCES

    rebased #264.

  • undefined reference to `Json::Value::Value(Json::ValueType)'

    undefined reference to `Json::Value::Value(Json::ValueType)'

    I use clion. I want to use json library. But i have soo many problems. Firstly undefined reference to `Json::Value::Value(Json::ValueType)'. How can i solve this problem.

  • Json testing with equals is failing.

    Json testing with equals is failing.

    I'm trying to test if 2 pieces of json is the same but having trouble with this one test. This is the console output below, is this a bug or am I doing equals testing wrong?

     FAILED:
      REQUIRE( returnJson == CEJsonHelper::parse( "{\"apiVersion\" : \"1.0.0\",\"inEffect\" : false,\"methodCaller\" : \"getDuckworthLewisStern\",\"oversRemainingIncludingBreaks\" : -1,\"oversUsedIncludingBreaks\" : -1,\"parScore\" : -1,\"projectedScore\" : -1,\"runsToWin\" : -1,\"runsToWinPerOver\" : -1,\"runsToWinPerOverAverage\" : -1,\"showResults\" : false,\"targetScore\" : -1,\"validResult\" : false,\"winningBy\" : -1,\"methodCaller\":\"getDuckworthLewisStern\"}") )
    with expansion:
    {
     "apiVersion" : "1.0.0",
      "inEffect" : false,
      "methodCaller" : "getDuckworthLewisStern",
      "oversRemainingIncludingBreaks" : -1,
      "oversUsedIncludingBreaks" : -1,
      "parScore" : -1,
      "projectedScore" : -1,
      "runsToWin" : -1,
      "runsToWinPerOver" : -1,
      "runsToWinPerOverAverage" : -1,
      "showResults" : false,
      "targetScore" : -1,
      "validResult" : false,
      "winningBy" : -1
      }
      ==
      {
      "apiVersion" : "1.0.0",
      "inEffect" : false,
      "methodCaller" : "getDuckworthLewisStern",
      "oversRemainingIncludingBreaks" : -1,
      "oversUsedIncludingBreaks" : -1,
      "parScore" : -1,
      "projectedScore" : -1,
      "runsToWin" : -1,
      "runsToWinPerOver" : -1,
      "runsToWinPerOverAverage" : -1,
      "showResults" : false,
      "targetScore" : -1,
      "validResult" : false,
      "winningBy" : -1
      }
    
  • isfinite compilation error

    isfinite compilation error

    Building CXX object myProject/third/CMakeFiles/third.dir/jsoncpp.cpp.o
    /home/vagrant/myProject/myProject/third/jsoncpp.cpp: In function ‘std::string Json::valueToString(double)’:
    /home/vagrant/myProject/myProject/third/jsoncpp.cpp:4049:21: error: ‘isfinite’ was not declared in this scope
       if (isfinite(value)) {
                         ^
    /home/vagrant/myProject/myProject/third/jsoncpp.cpp:4049:21: note: suggested alternative:
    In file included from /usr/include/c++/4.8/random:38:0,
                     from /usr/include/c++/4.8/bits/stl_algo.h:65,
                     from /usr/include/c++/4.8/algorithm:62,
                     from /home/vagrant/myProject/myProject/third/jsoncpp.cpp:2398:
    /usr/include/c++/4.8/cmath:596:5: note:   ‘std::isfinite’
         isfinite(_Tp __x)
         ^
    make[2]: *** [myProject/third/CMakeFiles/third.dir/jsoncpp.cpp.o] Error 1
    make[1]: *** [myProject/third/CMakeFiles/third.dir/all] Error 2
    make: *** [all] Error 2
    

    This is on Ubuntu Trusty, failing here (I am using an amalgamated version of SHA ed495edcc1bda878ef3cabd4c1ddaa1cdf2c57b0). For me, replacing isfinite() with std::isfinite() at that line let me compile. However due to the cross-platform support for isfinite here this isn't the real solution.

  • Data Corruption on Name in Output

    Data Corruption on Name in Output

    Describe the bug We are getting name corruption on output

    To Reproduce Steps to reproduce the behavior:

    Json::Value root;
    root["os_description"] = Json::Value(1);
    root["os_version"] = Json::Value(1);
    std::cout << "ROOT : " << root << std::endl;
    

    Output:

    ROOT: {
            "os_description" : 1,
            "os_versiontion" : 1
    }
    

    Expected behavior The original names to be respected:

    ROOT: {
            "os_description" : 1,
            "os_version" : 1
    }
    

    Desktop (please complete the following information):

    • OS: Windows 10 Pro for workstations 22H2
    • vcpkg - jsoncpp 1.9.5

    Additional context This has worked great for years. Tried a build with VS 2022 and cmake 2.25 and c++ v17 Release version is broken while debug versions works fine and present the correct output.

  • CMake: remove ccache babysitting

    CMake: remove ccache babysitting

    Is your feature request related to a problem? Please describe. Currently jsoncpp unconditionally tries to use ccache if found on system, so build may not be reproducible depending on build machine configuration, or even fails due to local cache corruption in ccache.

    Describe the solution you'd like Completely remove ccache micro-management in CMakeLists since it's not a usage requirement of jsoncpp. There is a canonical way to enable ccache usage: set CMAKE_C_COMPILER_LAUNCHER & CMAKE_CXX_COMPILER_LAUNCHER externally, so that users have full control over ccache usage, regardless of what is installed on their system.

  • TESTING: legacy_test_real13.json parsing failed.

    TESTING: legacy_test_real13.json parsing failed.

    Hi!

    I'm using latest jsoncpp from master, on a Windows 10 dev box with Visual Studio 2019

    Build has been configured with CMake :

    cmake -B ~/build/cpp/www-git/jsoncpp -D CMAKE_CONFIGURATION_TYPES=Release \
    -D CMAKE_INSTALL_PREFIX=~/build/cpp/www-git/jsoncpp/install -D BUILD_SHARED_LIBS=ON -D JSONCPP_WITH_TESTS=ON \
    -D JSONCPP_WITH_POST_BUILD_UNITTEST=ON -D JSONCPP_WITH_EXAMPLE=ON
    

    Everything builds fine, but one test (only one of all tests) in jsoncpp_readerwriter_tests fails :

    Excerpts from the output log of "Build Solution" in VS 2019 :

    18>C:\Users\olivier\build\cpp\www-git\jsoncpp\bin\Release\jsontestrunner_exe.exe  --json-writer StyledWriter "C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_11.json"
    18>C:\Users\olivier\build\cpp\www-git\jsoncpp\bin\Release\jsontestrunner_exe.exe  --json-writer StyledWriter "C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_12.json"
    18>C:\Users\olivier\build\cpp\www-git\jsoncpp\bin\Release\jsontestrunner_exe.exe  --json-writer StyledWriter "C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_13.json"
    18>Failed to parse input file:
    18>* Line 1, Column 2
    18>  '-1e+9999' is not a number.
    18>
    18>C:\Users\olivier\build\cpp\www-git\jsoncpp\bin\Release\jsontestrunner_exe.exe  --json-writer StyledWriter "C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_01.json"
    18>C:\Users\olivier\build\cpp\www-git\jsoncpp\bin\Release\jsontestrunner_exe.exe  --json-writer StyledWriter "C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_02.json"
    18>C:\Users\olivier\build\cpp\www-git\jsoncpp\bin\Release\jsontestrunner_exe.exe  --json-writer StyledWriter "C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_03.json"
    
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\fail_invalid_quote.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\fail_test_array_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\fail_test_array_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\fail_test_object_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\fail_test_stack_limit.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_array_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_array_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_array_03.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_array_04.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_array_05.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_array_06.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_array_07.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_03.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_04.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_05.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_06.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_07.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_08.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_basic_09.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_comment_00.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_comment_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_comment_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_complex_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_03.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_04.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_05.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_06_64bits.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_07_64bits.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_integer_08_64bits.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_large_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_object_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_object_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_object_03.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_object_04.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_preserve_comment_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_03.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_04.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_05.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_06.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_07.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_08.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_09.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_10.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_11.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_12.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_13.json parsing failed
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_03.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_04.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_05.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_unicode_01.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_unicode_02.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_unicode_03.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_unicode_04.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_string_unicode_05.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\test_array_08.json OK
    18>TESTING: C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\test_object_05.json OK
    18>
    18>Failure details:
    18>* Test C:\Users\olivier\dev\cpp\www-git\jsoncpp\test\data\legacy_test_real_13.json
    18>Parsing failed:
    18>
    18>
    18>Test results: 63 passed, 1 failed.
    

    Not sure what's going on here...

    Shouldn't '-1e+9999' be a 'number' as expected by the test ?

  • Fix asserts in Value::setComment

    Fix asserts in Value::setComment

    The existing asserts seem to not be what was intended; they appear to have been mistranslated in pull/877.

    The first assert for comment.empty() was previously a check that a provided const char* parameter was not null. The function this replaced accepted empty strings, and the if() statement at the start of this function handles them.

    The second assert for comment[0] == '\0' was written when comment was a const char*, and was testing for empty c-string input. This PR replaces it with comment.empty() to match the original intent.

  • Proposal: define exceptions when !JSON_USE_EXCEPTION

    Proposal: define exceptions when !JSON_USE_EXCEPTION

    The current behavior of only defining these classes when exceptions are enabled creates difficulties for large projects with trees of dependencies.

    OSS libraries will often reasonably try/catch on these exceptions, which causes those libraries not to build when !JSON_USE_EXCEPTION. This is easy to miss in those libraries, which don't test for nonstandard configurations of their dependencies, but it makes those libraries difficult to use in projects with large dependency trees that have already configured jsoncpp in this way.

Header-only library for automatic (de)serialization of C++ types to/from JSON.

fuser 1-file header-only library for automatic (de)serialization of C++ types to/from JSON. how it works The library has a predefined set of (de)seria

Oct 20, 2022
Yet another JSON/YAML/BSON serialization library for C++.
Yet another JSON/YAML/BSON serialization library for C++.

ThorsSerializer Support for Json Yaml Bson NEW Benchmark Results Conformance mac linux Performance max linux For details see: JsonBenchmark Yet anothe

Oct 27, 2022
JSON for Modern C++
JSON for Modern C++

Design goals Sponsors Integration CMake Package Managers Pkg-config Examples JSON as first-class data type Serialization / Deserialization STL-like ac

Nov 29, 2022
Parsing gigabytes of JSON per second
Parsing gigabytes of JSON per second

simdjson : Parsing gigabytes of JSON per second JSON is everywhere on the Internet. Servers spend a *lot* of time parsing it. We need a fresh approach

Nov 30, 2022
Similar to C++ streams, but the stream elements are structured JSON data rather than characters.

JIOS : JSON Input Output Streams Similar to C++ streams, but the stream elements are structured JSON data rather than characters. Contents Features [P

Aug 16, 2019
Your binary serialization library

Bitsery Header only C++ binary serialization library. It is designed around the networking requirements for real-time data delivery, especially for ga

Dec 1, 2022
Cap'n Proto serialization/RPC system - core tools and C++ library
Cap'n Proto serialization/RPC system - core tools and C++ library

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except

Dec 1, 2022
A C++11 library for serialization
A C++11 library for serialization

cereal - A C++11 library for serialization cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns

Dec 2, 2022
Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. MIT licensed with consistent, flexible API.

cppcodec Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockf

Dec 5, 2022
FlatBuffers: Memory Efficient Serialization Library

FlatBuffers FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serializ

Dec 8, 2022
FlatBuffers Compiler and Library in C for C

OS-X & Ubuntu: Windows: The JSON parser may change the interface for parsing union vectors in a future release which requires code generation to match

Dec 4, 2022
Simple C++ 20 Serialization Library that works out of the box with aggregate types!

BinaryLove3 Simple C++ 20 Serialization Library that works out of the box with aggregate types! Requirements BinaryLove3 is a c++20 only library.

Sep 2, 2022
A header only C++11 library for parsing TOML

tinytoml A header only C++11 library for parsing TOML. This parser is based on TOML v0.4.0. This library is distributed under simplified BSD License.

Oct 10, 2022
cpptoml is a header-only library for parsing TOML

cpptoml A header-only library for parsing TOML configuration files. Targets: TOML v0.5.0 as of August 2018. This includes support for the new DateTime

Dec 1, 2022
Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications

Zmeya Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications. Zmeya is not even a serializ

Nov 2, 2022
CppSerdes is a serialization/deserialization library designed with embedded systems in mind
CppSerdes is a serialization/deserialization library designed with embedded systems in mind

A C++ serialization/deserialization library designed with embedded systems in mind

Nov 5, 2022
Morse code decoding library
Morse code decoding library

ggmorse Morse code decoding library ggmorse2.mp4 ggmorse0.mp4 ggmorse1.mp4 Try it out You can easily test the library using the free GGMorse applicati

Nov 20, 2022
C++17 library for all your binary de-/serialization needs

blobify blobify is a header-only C++17 library to handle binary de-/serialization in your project. Given a user-defined C++ struct, blobify can encode

Oct 20, 2022
C++ BSON Library

This is a standalone BSON ("binary JSON") library for C++. (See bsonspec.org for more information on the BSON format.) The library is at this time a b

Nov 17, 2022