A C++ library for interacting with JSON.

Overview

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.
    enhancement 
    opened by rcdailey 30
  • 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.

    enhancement 
    opened by cinemast 29
  • 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
          }
       ]
    }
    
    opened by gzliudan 27
  • 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.

    opened by cfyzium 26
  • 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

    opened by subithaparamasivan 24
  • 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?

    bug 
    opened by emarthinsen 23
  • 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?

    opened by cinemast 22
  • 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.

    opened by cdunn2001 22
  • 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.

    help wanted 
    opened by FatmanurKucukayvaz 21
  • 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
      }
    
    bug help wanted 
    opened by dan-ryan 18
  • 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.

    opened by connormanning 18
  • GCC 12.2.0 Error

    GCC 12.2.0 Error

    Describe the bug Compile Error

    To Reproduce Steps to reproduce the behavior:

    sudo make & sudo make install

    [1] 90719
    Consolidate compiler generated dependencies of target jsoncpp_lib
    Consolidate compiler generated dependencies of target jsoncpp_lib
    [  5%] Linking CXX shared library ../../lib/libjsoncpp.dylib
    [  5%] Linking CXX shared library ../../lib/libjsoncpp.dylib
    0  0x1005301a0  __assert_rtn + 140
    1  0x1003b7a8c  mach_o::relocatable::Parser<arm64>::parse(mach_o::relocatable::ParserOptions const&) + 4536
    2  0x100389d38  mach_o::relocatable::Parser<arm64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 148
    3  0x1003f24ac  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 1468
    0  0x102e5c1a0  __assert_rtn + 140
    1  0x102ce3a8c  mach_o::relocatable::Parser<arm64>::parse(mach_o::relocatable::ParserOptions const&) + 4536
    2  0x102cb5d38  mach_o::relocatable::Parser<arm64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 148
    3  0x102d1e4ac  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 1468
    4  0x102d21360  ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 56
    5  0x19550c1f4  _dispatch_client_callout2 + 20
    6  0x19551f954  _dispatch_apply_invoke + 224
    4  0x1003f5360  ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 56
    7  0x19550c1b4  _dispatch_client_callout + 20
    5  0x19550c1f4  _dispatch_client_callout2 + 20
    8  0x19551da04  _dispatch_root_queue_drain + 680
    9  0x19551e104  _dispatch_worker_thread2 + 164
    10  0x1956cc324  _pthread_wqthread + 228
    6  0x19551f954  _dispatch_apply_invoke + 224
    7  0x19550c1b4  _dispatch_client_callout + 20
    A linker snapshot was created at:
            /tmp/libjsoncpp.1.9.5.dylib-2022-09-15-162743.ld-snapshot-1
    ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061.
    8  0x19551da04  _dispatch_root_queue_drain + 680
    9  0x19551e104  _dispatch_worker_thread2 + 164
    10  0x1956cc324  _pthread_wqthread + 228
    A linker snapshot was created at:
            /tmp/libjsoncpp.1.9.5.dylib-2022-09-15-162743.ld-snapshot
    ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061.
    collect2: error: ld returned 1 exit status
    collect2: error: ld returned 1 exit status
    make[2]: make[2]: *** [lib/libjsoncpp.1.9.5.dylib] Error 1*** [lib/libjsoncpp.1.9.5.dylib] Error 1
    
    make[1]: *** [src/lib_json/CMakeFiles/jsoncpp_lib.dir/all] Error 2
    make[1]: *** [src/lib_json/CMakeFiles/jsoncpp_lib.dir/all] Error 2
    make: *** [all] Error 2
    make: *** [all] Error 2
    

    Desktop (please complete the following information):

    • OS: M1 MacOS
    • Meson version macOS Monterey 12.6
    • Ninja version GCC 12.2.0
    opened by 1111mp 0
  • GCC 12.2.0 build warning for uninitialized variable

    GCC 12.2.0 build warning for uninitialized variable

    Describe the bug The GCC 12.2.0 compiler warns that a variable may be uninitialized when building JSONCPP, specifically here (v):

      case tokenNull:
        {
        Value v;
        currentValue().swapPayload(v);
        currentValue().setOffsetStart(token.start_ - begin_);
        currentValue().setOffsetLimit(token.end_ - begin_);
        }
        break;
    

    in jsoncpp.cpp

    To Reproduce Just building jsoncpp.cpp in a project.

    Expected behavior No warning.

    I even expect that :

    Value v(); 
    

    We resolve the issue.

    Desktop (please complete the following information):

    • vanilla Arch Linux, GCC 12.2.0
    opened by christophe-lunarg 0
  • "Warning: corrupt .drectve at end of def file" error when building with CMake

    Describe the bug I'm getting a "Warning: corrupt .drectve at end of def file" error at compilation time when trying to build with CMake. I'm using a fresh install of CLion (obtainable here) on Windows 11.

    To Reproduce Steps to reproduce the behavior (assuming that vcpkg and CLion are correctly installed):

    1. Create a new project in CLion
    2. Run vcpkg integrate install, it will execute and print a statement similar to this one: CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
    3. Go to File > Settings > Build, Execution, Deployment > Toolchains > CMake and paste the string obtained in the previous step in CMake Options, then apply
    4. Run vcpkg install jsoncpp, it will print a statement similar to this one: jsoncpp provides CMake targets: # this is heuristically generated, and may not be correct find_package(jsoncpp CONFIG REQUIRED) target_link_libraries(main PRIVATE jsoncpp_lib jsoncpp_object JsonCpp::JsonCpp)
    5. Paste those two lines in the CMakeLists.txt file inside the project and substitute main with the project's name
    6. Run the project and it should stop at compilation time with this error: Warning: corrupt .drectve at end of def file

    Expected behavior I'm expecting the program to correctly build and run.

    opened by retr00h 0
  • APP eventually crash when using libjsoncpp.so.24, help!!!

    APP eventually crash when using libjsoncpp.so.24, help!!!

    Describe the bug eventually crash as: *** Error in `./app': corrupted size vs. prev_size: 0x00007fd93c0049e0 *** ======= Backtrace: ========= /usr/lib64/libc.so.6(+0x80ba7)[0x7fd94519fba7] /usr/lib64/libc.so.6(+0x8248b)[0x7fd9451a148b] /usr/lib64/libc.so.6(__libc_malloc+0x4c)[0x7fd9451a46fc] /usr/lib64/libstdc++.so.6(_Znwm+0x1d)[0x7fd945a6418d] /usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x87)[0x7fd9468ce6f7] /usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x120)[0x7fd9468ce790] /usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x100)[0x7fd9468ce770] /usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x120)[0x7fd9468ce790] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9] /usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x47)[0x7fd9468ce6b7] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9] /usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x47)[0x7fd9468ce6b7] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9] /usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x47)[0x7fd9468ce6b7] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f] /usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9]

    To Reproduce accidental occurance eventually crash Expected behavior what should i do, this is my app or json or libc problem?

    Desktop (please complete the following information): centos 7 intel cpu ** mycode

        Json::Value data;
        data = Json::objectValue;
        if (type == "json") {
            Json::Value result = Json::arrayValue;
            for (auto i : myResult) {
                result.append(i);
            }
            data["json"].append(result);
        } else {
            std::string result;
            for (auto i : myResult) {
                result += std::to_string(i) + " ";
            }
            data["txt"].append(result);
        }
    
    
    opened by allen20200111 0
  • Can you please cut a new release?

    Can you please cut a new release?

    Is your feature request related to a problem? Please describe. Currently the latest tag of 1.9.5 doesn't include bug fixes such as https://github.com/open-source-parsers/jsoncpp/pull/1353

    Describe the solution you'd like It would be nice if a new release was cut to include those fixes. Can you please cut a new release?

    opened by snakethatlovesstaticlibs 0
Releases(1.9.5)
  • 1.9.5(Nov 3, 2021)

  • 1.9.4(Sep 26, 2020)

    This patch contains several fixes found through the OSS-Fuzz project fuzzing, increasing the security of the library, as well as some fixes for different build systems.

    Source code(tar.gz)
    Source code(zip)
  • 1.9.3(May 29, 2020)

    Fix #1181 : Update the version tag - 1.9.3.


    This release includes several important bug fixes for unblocking some consumer's use cases.

    1. Fixes to JSON_USE_EXCEPTION--some bugs creeped in breaking this flag in pre-release.
    2. Fixes to build system--improvements have been make for code correctness.
    3. Compile errors for various platforms have been resolved.
    4. Fuzzing has been fixed.
    5. Various bugs in the Reader and Writer code have been corrected.
    6. CPPTL support has been dropped.
    7. Various code improvements and optimizations.
    Source code(tar.gz)
    Source code(zip)
  • 00.11.0(Apr 30, 2020)

    This release is based on branch 00.11.z, which is different from branch 0.y.z and 1.y.z.

    The main purpose of this release is to give users a third choice, that is, users can only have a copy of the code, but can build in different environments, so it can be used with old or newer compilers.

    The benefit is that users can use some new features in this new branch that introduced in 1.y.z, but can hardly applied into 0.y.z.

    All changes in the source code are for compatibility with pre-C++11 and C++11 standards. At the same time , we add more CIs to ensure all changes in all environments can work well.

    Source code(tar.gz)
    Source code(zip)
  • 1.9.2(Nov 13, 2019)

    We are still working towards a release that we consider completely "stable." However, since multiple build fixes have been consumed since 1.9.1, here is a prerelease 1.9.2 build that contains those fixes.

    Source code(tar.gz)
    Source code(zip)
  • 1.9.1(Jul 11, 2019)

  • 1.9.0(Jul 2, 2019)

    It's been ~2 years since the last release, so this has quite a few changes. Some highlights:

    • Build optimizations and updates. Now needs at least Meson 0.50.0, bot support for VS 2013 dropped in favor of VS 2017 (#952, #955, #934, #933, #932, #911, #883, many others...).
    • Lots of bug fixes (incl. #902, #872, #869,
    • Lots of enhancements (#873, #
    • Lots of cleanup (#870, #867, #865, #864, #847, #849, ...)

    Mostly minor bug fixes and improvements, not too many big changes--not ready for version 2.0.0 release yet.

    Source code(tar.gz)
    Source code(zip)
  • 0.10.7(Dec 4, 2018)

    Needed for https://github.com/open-source-parsers/jsoncpp/issues/828#issuecomment-443533340

    If this is really a minor update, sorry. And sorry for not updating the version string in the source-code. No time. A PR would be accepted.

    Source code(tar.gz)
    Source code(zip)
  • 1.8.4(Dec 20, 2017)

    • Functional changes
      • Serialize UTF-8 string with Unicode escapes (#687)
        • This will break anyone who relied on not Unicode-escaping their encoding strings.
        • See discussion at #687. (A future release might allow skipping all Unicode escape.)
      • Un-deprecate removeMember overloads, return void (#693)
      • Allow Json::Value to be used in a boolean context (#695)
      • Use move ctor in append() (#677)
      • Add value_type to improve integration with boost (#671)
    • Meta-changes
      • Fix meson.build to allow using jsoncpp as a subproject
      • Fix some compiler warnings
      • Update docs
      • Update for TravisCI
    Source code(tar.gz)
    Source code(zip)
  • 1.8.3(Aug 30, 2017)

  • 1.8.2(Aug 27, 2017)

    • Some C++ "move" operators.
      • (If these require a bump in the ABI number, please let us know.)
    • Fix uninitialized value detected by valgrind. (Thanks to @ya1gaurav for first noticing this.)
    • Other minor improvements.
    • Moved most READ docs to Wiki.
    Source code(tar.gz)
    Source code(zip)
  • 1.8.1(Jun 26, 2017)

  • 1.8.0(Dec 14, 2016)

    Plus some other build-related changes. I don't think there is anything functionally different from 1.7.7, or even any binary incompatibilities, but the cmake change is significant.

    Source code(tar.gz)
    Source code(zip)
  • 1.7.7(Oct 2, 2016)

    At the suggestion of Peter Spiess-Knafl, we will bump the SOVERSION independent of the MAJOR.MINOR.MICRO version, in case we break binary compatibility.

    Source code(tar.gz)
    Source code(zip)
  • 1.7.6(Sep 26, 2016)

  • 1.7.5(Sep 1, 2016)

    • Fix locale for decimal points
      • Plus a fix for Android
    • int64_t for 64-bit integers
    • Optionally suppress space after comma
    • Avoid null for empty stringValue
    • Fix null ctor/dtor, using a "Meyers Singleton"
      • Thanks to @marklakata and @BillyDonahue in #488 in #490.
    Source code(tar.gz)
    Source code(zip)
  • 1.7.4(Jul 9, 2016)

  • 1.7.3(Jun 27, 2016)

    • Fix static initialization of null with Myers Singleton. (Thanks @marklakata )
    • Fix other minor compiler and installation problems and warnings.
    • Fix amalgamated header.
    Source code(tar.gz)
    Source code(zip)
  • 1.7.2(Mar 25, 2016)

  • 1.7.1(Mar 22, 2016)

    • New precision setting in StreamBuilder
    • Move-semantics for some ctors
    • Added details to exception messages
      • Clarified when exceptions are thrown
    • Support isinfinite()
    • Secure memory-wiping allocator (via compilation flag, settable via cmake)
      • For this, we changed all STL datatypes to macros, but all unchanged by default.
    • Lots of minor build-related improvements
      • Notably, cmake support for ccache
      • More supported systems
        • gcc-6
        • musl
        • MinGW
        • Cygwin
        • QNX
        • VS2010 (for now, but you can always use old versions of JsonCpp)

    Note: 1.7.0 was recalled b/c it accidentally included SecureAlloc by default.

    Source code(tar.gz)
    Source code(zip)
    jsoncpp-1.7.1.tar.gz.asc(473 bytes)
  • 1.6.5(Jul 23, 2015)

  • 0.10.5(Jul 23, 2015)

  • 0.10.4(Jul 12, 2015)

    We have done some house-keeping, so even tough the only real change here is a minor bug-fix, this release is an improvement.

    • -Werror
    • -Wshadow, plus a big-fix found from it
    • fixed most warnings (but still cannot use -Wconversion with older compilers, or -Wsign-conversion with newer)
    • dockerized Travis CI builds
    • explicitly use older compiler in Travis (gcc-4.6, while master branch uses gcc-4.9 or later, plus -std=c++11)

    (0.10.3 was a non-release because of a signing error in 0.10.2.)

    Source code(tar.gz)
    Source code(zip)
    jsoncpp-0.10.4.tar.gz.asc(473 bytes)
  • 0.10.2-p1(Jun 19, 2015)

  • 1.6.2(Apr 11, 2015)

    • Do not truncate output at embedded zeroes.

    This was already fixed the new StreamWriter, which is used by the default stream inserter. This fix will not break anything that wasn't already broken.

    Source code(tar.gz)
    Source code(zip)
  • 0.10.2(Apr 11, 2015)

  • 1.6.1(Mar 31, 2015)

  • 0.10.1(Mar 31, 2015)

Owner
null
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

null 49 Jun 4, 2022
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

Loki Astari 278 Sep 14, 2022
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

Niels Lohmann 31.8k Sep 17, 2022
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

null 16.1k Sep 22, 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

Castedo Ellerman 3 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

Mindaugas Vinkelis 739 Sep 9, 2022
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

Cap'n Proto 9.2k Sep 17, 2022
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

iLab @ USC 3.3k Sep 18, 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

Topology 479 Sep 20, 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

Google 18.8k Sep 25, 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

null 526 Sep 23, 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.

RedSkittleFox 14 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.

mayah 159 Jun 8, 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

Chase Geigle 554 Sep 2, 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

Sergey Makeev 96 Jul 4, 2022
CppSerdes is a serialization/deserialization library designed with embedded systems in mind

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

Darren V Levine 81 Aug 7, 2022
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

Georgi Gerganov 94 Sep 4, 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

Tony Wasserka 246 Sep 11, 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

Dwight Merriman 54 Jul 18, 2022