A C++11 or library for parsing and serializing JSON to and from a DOM container in memory.

Overview

Boost.JSON

Branch master develop
Azure Build Status Build Status
Docs Documentation Documentation
Drone Build Status Build Status
Matrix Matrix Matrix
Fuzzing --- fuzz
Appveyor Build status Build status
codecov.io codecov codecov

Boost.JSON

Overview

Boost.JSON is a portable C++ library which provides containers and algorithms that implement JavaScript Object Notation, or simply "JSON", a lightweight data-interchange format. This format is easy for humans to read and write, and easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language (Standard ECMA-262). JSON is a text format that is language-independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

This library focuses on a common and popular use-case: parsing and serializing to and from a container called value which holds JSON types. Any value which you build can be serialized and then deserialized, guaranteeing that the result will be equal to the original value. Whatever JSON output you produce with this library will be readable by most common JSON implementations in any language.

The value container is designed to be well suited as a vocabulary type appropriate for use in public interfaces and libraries, allowing them to be composed. The library restricts the representable data types to the ranges which are almost universally accepted by most JSON implementations, especially JavaScript. The parser and serializer are both highly performant, meeting or exceeding the benchmark performance of the best comparable libraries. Allocators are very well supported. Code which uses these types will be easy to understand, flexible, and performant.

Boost.JSON offers these features:

  • Fast compilation
  • Require only C++11
  • Fast streaming parser and serializer
  • Constant-time key lookup for objects
  • Options to allow non-standard JSON
  • Easy and safe modern API with allocator support
  • Compile without Boost, define BOOST_JSON_STANDALONE
  • Optional header-only, without linking to a library

Requirements

The library relies heavily on these well known C++ types in its interfaces (henceforth termed standard types):

  • string_view
  • memory_resource, polymorphic_allocator
  • error_category, error_code, error_condition, system_error

The requirements for Boost.JSON depend on whether the library is used as part of Boost, or in the standalone flavor (without Boost):

Using Boost

  • Requires only C++11
  • The default configuration
  • Aliases for standard types use their Boost equivalents
  • Link to a built static or dynamic Boost library, or use header-only (see below)
  • Supports -fno-exceptions, detected automatically

Without Boost

  • Requires C++17
  • Aliases for standard types use their std equivalents
  • Obtained when defining the macro BOOST_JSON_STANDALONE
  • Link to a built static or dynamic standalone library, or use header-only (see below)
  • Supports -fno-exceptions: define BOOST_NO_EXCEPTIONS and boost::throw_exception manually

When using without Boost, support for <memory_resource> is required. In particular, if using libstdc++ then version 8.3 or later is needed.

Header-Only

To use as header-only; that is, to eliminate the requirement to link a program to a static or dynamic Boost.JSON library, simply place the following line in exactly one new or existing source file in your project.

#include <boost/json/src.hpp>

Standalone Shared Library

To build a standalone shared library, it is necessary to define the macros BOOST_JSON_DECL and BOOST_JSON_CLASS_DECL as appropriate for your toolchain. Example for MSVC:

// When building the DLL
#define BOOST_JSON_DECL       __declspec(dllexport)
#define BOOST_JSON_CLASS_DECL __declspec(dllexport)

// When building the application which uses the DLL
#define BOOST_JSON_DECL       __declspec(dllimport)
#define BOOST_JSON_CLASS_DECL __declspec(dllimport)

Embedded

Boost.JSON works great on embedded devices. The library uses local stack buffers to increase the performance of some operations. On Intel platforms these buffers are large (4KB), while on non-Intel platforms they are small (256 bytes). To adjust the size of the stack buffers for embedded applications define this macro when building the library or including the function definitions:

#define BOOST_JSON_STACK_BUFFER_SIZE 1024
#include <boost/json/src.hpp>

Note

This library uses separate inline namespacing for the standalone
mode to allow libraries which use different modes to compose
without causing link errors. Linking to both modes of Boost.JSON
(Boost and standalone) is possible, but not recommended.

Supported Compilers

Boost.JSON has been tested with the following compilers:

  • clang: 3.8, 4, 5, 6, 7, 8, 9, 10, 11
  • gcc: 4.8, 4.9, 5, 6, 7, 8, 9, 10
  • msvc: 14.0, 14.1, 14.2

Quality Assurance

The development infrastructure for the library includes these per-commit analyses:

  • Coverage reports
  • Benchmark performance comparisons
  • Compilation and tests on Drone.io, Azure Pipelines, Appveyor
  • Fuzzing using clang-llvm and machine learning

Visual Studio Solution

cmake -G "Visual Studio 16 2019" -A Win32 -B bin -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/msvc.cmake
cmake -G "Visual Studio 16 2019" -A x64 -B bin64 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/msvc.cmake

License

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

Issues
  • json Conversions to/from C++ objects

    json Conversions to/from C++ objects

    Does Boost.json support conversions from C++ objects to json, and from json to C++ objects? Use case is in the interface between C++ application and calls to the ArangoDB HTTP REST API. I'm using libcurl to generate REST calls (with json bodies) into ArangoDB, and I need to convert C++ object members and their values to json for those calls. Then, on the return route, I need to populate C++ object members with the json data returned from ArangoDB calls. I also need to know if such conversions can be done recursively, or only singly.

    What of the case where my C++ objects exist in a vector or other std container? I'm looking for functionality akin to that noted here: https://stackoverflow.com/questions/17549906/c-json-serialization

    Scroll down to the solution with 85 votes, posted by Guillaume Racicot.

    opened by JoeStroupe 33
  • tuple-like key_value_pair (for structured bindings)

    tuple-like key_value_pair (for structured bindings)

    At the moment key_value_pair cannot be used for structured bindings without user boilerplate. Since it does model a pair anyway and offers an interface similar to std::pair, it would be nice for it to also specialize std::tuple_size, std::tuple_element and a form of get when using C++17 or above This would make the following code well-formed in C++17 or above:

    object o{{"one", 1}, {"two", 2}};
    const auto it = o.find("one");
    if (it == o.end())
      handle_error();
    const auto& [key, value] = *it;
    

    Note that replacing object with std::map<std::string, int> would produce well-formed C++17 code (see https://godbolt.org/z/fVZUkC)

    If this is something the authors would like too see too, I'd happily make a PR for it

    Feature 
    opened by AeroStun 20
  • Add support for json::string to std::string_view conversion

    Add support for json::string to std::string_view conversion

    When I'm using Boost.JSON along with Boost.Beast, it's common to parse a json frame from a remote http/websocket server and do some processing with it.

    A typical scenario is, I need to pass a json::string to a function where a std::string_view is expected.

    I can use standalone Boost.JSON with macro BOOST_JSON_STANDALONE to replace boost::string_view with std::string_view. But since I also need Boost.Beast, mixing Boost and standalone Boost.JSON would result in a lot of "macro redefinition" error.

    So now I have to tediously do the conversion like this everytime

    void process_sv(std::string_view sv);
    
    auto j_str = j_v.as_string();
    auto j_sv = std::string_view(j_str.data(), j_str.size());
    
    process_sv(j_sv);
    

    It would make it much more convenient if a direct conversion from json::string to std::string_view is available.

    Thank you!

    opened by elegracer 17
  • Support for numbers which can't be represented by int64_t/uint64_t/double

    Support for numbers which can't be represented by int64_t/uint64_t/double

    I want to interface with a finance service that unfortunately encodes monetary quantities as JSON numbers. To process those correctly, parsing and storage of numbers needs to be customized. Specifically, I want to parse them into boost::multiprecision::cpp_dec_float.

    (I realize that this particular case can be worked around by converting the parsed doubles back to shortest string representation and parsing decimal floats from that. However, my point stands - it's useful to be able to handle numbers that can't be represented by int64_t/uint64_t/double, like big integers or arbitrary precision floats.)

    Well, I thought, I just need a template-based JSON library which would let me supply my custom numeric type and a parser for it. Something like nlohmann::json, perhaps. Except nlohmann::json doesn't let you supply arbitrary numeric types, only built-in ones. In fact, after a few hours spent surveying numerous C++ JSON libs on github, to my great surprise I couldn't find one that would let me do that.

    Of course, I realize boost::json is explicitly designed with different goals in mind. And I'm not advocating converting it to templates or anything like that. Fortunately, that's unnecessary. Consider:

    • To parse_options add bool numbers_as_strings = false; member (perhaps partitioned into ints_as_strings/floats_as_strings).
    • Find a single spare bit somewhere within string representation. Use it to indicate that this string was parsed from JSON number/must be serialized as JSON number. Let's call it raw_number flag. Initialize it to false. Add a getter and a setter for it, both public.
    • When parsing, if numbers_as_strings is set upon encountering a number, create a string consisting of exactly the characters comprising the number in input. Set the raw_number flag on it. Otherwise, parse int64_t/uint64_t/double as usual.
    • When serializing a string, if raw_number flag is set on it, assume the content is a valid JSON number and dump it into the output without quoting/escaping. Otherwise, serialize the string as usual.
    • Optionally, provide functions to convert string to/from int64_t/uint64_t/double using the algorithms currently employed by the parser/serializer.

    This moves number parsing/serialization to user code when necessary, in a way that doesn't complicate usage for people who don't care about this—admittedly quite rare—case. I believe it also fits the design principles of this library as I understand them. You guys have done a great job making common things easy, here I aim to make uncommon things possible.

    Do you consider this a reasonable design? Something you're willing to merge if presented with a PR? (not that I have one at the moment)

    opened by yuri-kilochek 16
  • Update bintray credentials (was: add fuzzing)

    Update bintray credentials (was: add fuzzing)

    This is a ticket to keep track of adding fuzz testing. I promised to help out, so here I am! I wanted to highlight the plan so everyone is happy with the direction.

    The plan is to

    • add a fuzz target (and build support, if necessary)
    • helper scripts to get an initial seed corpus
    • add a github action which runs the fuzzing for a short time (30 seconds or so) to make sure easy to find bugs are detected already at the pull request stage

    Building

    I had problem building the library - I suspect others wanting to try it out also may run into problems. Is there documentation somewhere that I missed? I expected the usual git clone, submodule recursive update, cmake to work out of the box but there seems to be a dependency on boost beast.

    Fuzz target

    There is already a fuzzer in #13 . @msimonsson are you ok that I incorporate your fuzzer code from that ticket under the boost license? I assume this is OK, but I am not a lawyer (well perhaps a C++ language lawyer wannabe :-).

    Github Action

    I have used this for the simdjson project recently, worked fine. I am not sure if it is possible to browse through it unless being a member, but here are some links:

    • the config: https://github.com/lemire/simdjson/blob/master/.github/workflows/fuzzers.yml
    • the jobs: https://github.com/lemire/simdjson/actions
    • partial motivation: https://github.com/lemire/simdjson/issues/370

    For efficiency, it is good if the corpus can be stored somewhere between the runs. Otherwise it has to bootstrap each time which is inefficient. I use bintray for simdjson - @vinniefalco where would you be ok to store the corpus, do you perhaps already have a bintray account? In the meanwhile, I will use my own.

    Implementation

    I develop this in my clone for now. See the Readme over here: https://github.com/pauldreik/json/tree/paul/fuzz/fuzzing

    opened by pauldreik 16
  • Consider using the same atomic ops as boost::shared_ptr` does.

    Consider using the same atomic ops as boost::shared_ptr` does.

    https://github.com/boostorg/json/blob/5098730a87148228f65b2dcb40ecec7f15019c09/include/boost/json/storage_ptr.hpp#L108

    boost::json::storage_ptr uses sequentially consistent atomic ops for the reference count. This is needlessly expensive on most non-x86 platforms, in particular arm and the like. boost::shared_ptr apparently implements more efficient reference counting (usually relaxed inc + acquire release dec). Considering that there's one storage_ptr per value, that's potentially quite a large number of incs and decs for a large json document. I would suggest that storage_ptr reference count operations match those of boost::shared_ptr.

    opened by maximilianriemensberger 15
  • Cmake overhaul

    Cmake overhaul

    Some refactoring of root and test CMakeLists.txt

    • Add json tests to tests target (as has been requested by @pdimov in #581)
    • Refactor json usage requirements into a separate CMake target (fixes #562)
    • Overhaul of dealing with CMake use cases (fixes #582)
    • Fix test standalone_with_boost for CMake (fixes #577)
    • Other minor changes
    opened by grisumbras 14
  • Make boost::json::string implicitly convertible to std::string

    Make boost::json::string implicitly convertible to std::string

    Version of Boost

    1.75

    This is more of a would-be-nice type of issue.

    Because the boost::json::string is not implicitly convertible to std::string you have to always do:

    std::string s = {jv.as_string().data(), jv.as_string().size()}; //ok but unyieldy
    //or
    std::string s = value_to<std::string>(jv); //via tag dispatch. ok but not user friendly
    //ideally
    std::string s = jv.as_string();
    

    Alternatively remove the boost::json::string type altogether, unless it has some special built-in features which I'm not aware of.

    Same goes for boost::string_view.

    I understand that under JSON_STANDALONE these types are aliased to STL types, but from a user perspective is highly undesirable. If I want to switch tomorrow from standalone to boost+json or vice-versa, my code will no longer compile. Ideally consider not using any other boost types unless you have < C++17, in which case you simply use std::string instead of string_view on your public interfaces.

    opened by accelerated 13
  • Add std::hash specializations for json types

    Add std::hash specializations for json types

    As discussed for the issue #521, this pull request

    • Add std::hash specializations for json::array, json::object, and json::value.
    • Add a new header boost/json/detail/hash_combine.hpp for inline hash functions.
    • Add basic unit tests
    Feature 
    opened by doganulus 13
  • Heap-buffer-overflow when fuzzing with libFuzzer

    Heap-buffer-overflow when fuzzing with libFuzzer

    Fuzzing the validate() function in example/validate.cpp results in heap-buffer-overflow:

    ==75832==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000005901 at pc 0x00000031fa46 bp 0x7fffffff8f50 sp 0x7fffffff8f48
    READ of size 1 at 0x603000005901 thread T0
        #0 0x31fa45 in boost::json::basic_parser::write_some(char const*, unsigned long, std::__1::error_code&)
            boost/json/impl/basic_parser.ipp:456:16
        #1 0x30f73c in boost::json::basic_parser::write(char const*, unsigned long, std::__1::error_code&)
            boost/json/impl/basic_parser.ipp:894:9
        #2 0x309cf2 in boost::json::basic_parser::finish(char const*, unsigned long, std::__1::error_code&)
            boost/json/impl/basic_parser.ipp:924:5
        #3 0x30937e in (anonymous namespace)::validate(std::__1::basic_string_view<char, std::__1::char_traits<char> >)
            bjson.cc:73:11
    

    Input:

    \"~QQ36644632   {n
    Base64: In5RUTM2NjQ0NjMyICAge24=
    

    Please let me know if you need more details.

    opened by msimonsson 13
  • JSON pointer implementation

    JSON pointer implementation

    • Class pointer in boost/json/pointer.hpp; stores a string_view that should contain a JSON Pointer string.
    • Member function value& value::at(pointer) that either returns a reference to corresponding child or throws system_error.
    • Member function value* value::find(pointer, error_code&) that either returns a pointer to corresponding child or sets error_code to some error.
    • const versions of those functions.
    • Extend error and error_condition enums with values needed for Pointer.
    opened by grisumbras 12
  • Add a nonthrowing overload for value_to

    Add a nonthrowing overload for value_to

    Implementing value_to for variant (for one possible representation) involves repeatedly trying value_to for each alternative. Since value_to reports failures via exceptions, this will be slow. It would be better if value_to had a noexcept overload that could be used for this purpose.

    There's no perfect option here, because returning result<T> would impose a dependency on System, and we want people to be able to add JSON support without a dependency. The other alternative

    bool value_to( value const& jv, T& t, error_code& ec );
    

    would require T to be default-constructible, but this may be good enough, as the "traditional" value_to can be used for other types.

    A default implementation for this overload would be

    bool value_to( value const& jv, T& t, error_code& ec )
    {
        try
        {
            t = value_to( jv );
            return true;
        }
        catch( system_error const& x )
        {
            ec = x.code();
        }
        catch( ... )
        {
            ec = ...;
        }
    
        return false;
    }
    

    but "basic" types should have proper nonthrowing overloads.

    opened by pdimov 0
  • explore value_or

    explore value_or

    We can try exploring this signature:

    value object::value_or( string_view key, value_ref v );
    

    Or if there are problems with constructing basic types we could do

    template<class T>
    value object::value_or( string_view key, T const& t )
    {
      value_ref v(t);
      ...
    

    This would inhibit arrays and objects from being used as the alternate value but that might be desired.

    opened by vinniefalco 0
  • doc glitch

    doc glitch

    This needs to be checked in 1.80. detail::find_in_object should not be visible:

    https://www.boost.org/doc/libs/1_79_0/libs/json/doc/html/json/ref/boost__json__object.html

    image

    opened by vinniefalco 0
  • boost.json on windows is crashed when read json file

    boost.json on windows is crashed when read json file

    My developement environment as following: System: windows 10 pro C++ Compiler: vs2019 16.11.15 Build boost 1.79 by used to C++ Standard 14 on vs2019 16.11.15

    Below codes will be crashed if build it and switch /std::c++20 in boost 1.79 but work well switch to /std::c++14 and /std::c++17

    #include <iostream>
    #include <deque>
    #include <string>
    #include <map>
    #include <fstream>
    #include <memory>
    #include <type_traits>
    
    #include <boost/json.hpp>
    #include <boost/mp11.hpp>
    #include <boost/describe.hpp>
    
    
    namespace json = boost::json;
    
        
    json::value readJson( std::istream& is, json::error_code& ec )
    {
        json::stream_parser p;
        for(std::string line; std::getline( is, line ); )
        {
            p.write( line, ec );
            if (ec) 
            {
                return nullptr;
            }
        }
    
        p.finish( ec );
    
        if (ec) 
        {
            return nullptr;
        }
    
        return p.release();
    }
    
    void writeJson( std::ostream& os, json::value const& jv, std::string* indent = nullptr )
    {
        std::string indent_;
        if(! indent)
            indent = &indent_;
        switch(jv.kind())
        {
        case json::kind::object:
        {
            os << "{\n";
            indent->append(4, ' ');
            auto const& obj = jv.get_object();
            if(! obj.empty())
            {
                auto it = obj.begin();
                for(;;)
                {
                    os << *indent << json::serialize(it->key()) << " : ";
                    writeJson(os, it->value(), indent);
                    if(++it == obj.end())
                        break;
                    os << ",\n";
                }
            }
            os << "\n";
            indent->resize(indent->size() - 4);
            os << *indent << "}";
            break;
        }
    
        case json::kind::array:
        {
            os << "[\n";
            indent->append(4, ' ');
            auto const& arr = jv.get_array();
            if(! arr.empty())
            {
                auto it = arr.begin();
                for(;;)
                {
                    os << *indent;
                    writeJson( os, *it, indent);
                    if(++it == arr.end())
                        break;
                    os << ",\n";
                }
            }
            os << "\n";
            indent->resize(indent->size() - 4);
            os << *indent << "]";
            break;
        }
    
        case json::kind::string:
        {
            os << json::serialize(jv.get_string());
            break;
        }
    
        case json::kind::uint64:
            os << jv.get_uint64();
            break;
    
        case json::kind::int64:
            os << jv.get_int64();
            break;
    
        case json::kind::double_:
            os << jv.get_double();
            break;
    
        case json::kind::bool_:
            if(jv.get_bool())
                os << "true";
            else
                os << "false";
            break;
    
        case json::kind::null:
            os << "null";
            break;
        }
    
        if(indent->empty())
            os << "\n";
    }
    
    template<class T> 
    void extract( json::object const & obj, char const * name, T & value )
    {
        value = json::value_to<T>( obj.at( name ) );
    }
    
    template<
        typename T,
        typename D1 = boost::describe::describe_members<T, boost::describe::mod_public | boost::describe::mod_protected>,
        typename D2 = boost::describe::describe_members<T, boost::describe::mod_private>,
        typename En = std::enable_if_t<boost::mp11::mp_empty<D2>::value> 
    >
    T tag_invoke( json::value_to_tag<T> const&, json::value const& v )
    {
        auto const& obj = v.as_object();
    
        T t{};
    
        boost::mp11::mp_for_each<D1>([&](auto D)
        {
            extract( obj, D.name, t.*D.pointer );
        });
    
        return t;
    }
    
    template<
        typename T,
        typename D1 = boost::describe::describe_members<T, boost::describe::mod_public | boost::describe::mod_protected>,
        typename D2 = boost::describe::describe_members<T, boost::describe::mod_private>,
        typename En = std::enable_if_t<boost::mp11::mp_empty<D2>::value> 
    >
    void tag_invoke( json::value_from_tag const&, json::value& v, T const & t )
    {
        auto& obj = v.emplace_object();
    
        boost::mp11::mp_for_each<D1>([&](auto D)
        {
            obj[ D.name ] = json::value_from( t.*D.pointer );
        });
    }
    
    class JsonFile 
    {
    public:
        
        template <typename T>
        static void loadJsonFile(const std::string file, T& info) 
        {
            try
            {
                std::ifstream inFile(file, std::ios::in);
    
                json::error_code ec;
                auto val = readJson(inFile, ec);
                if (ec)
                {
                    throw json::system_error(ec, "read json file error:");
                }
    
                info = json::value_to<T>(val);
            }
            catch (std::exception&)
            {
                throw;
            }
        }
    
        template <typename T>
        static void saveJsonFile(const std::string file, const T& info) 
        {
            try
            {
                std::ofstream outFile(file, std::ios::out | std::ios::trunc);
    
                auto jv = boost::json::value_from(info);
                writeJson(outFile, jv);
            }
            catch (std::exception&)
            {
                throw;
            }
        }
    };
    
    struct OBACmd
    {
        std::string command;
        friend bool operator<(const OBACmd& lValue, const OBACmd& rValue) 
        {
            return lValue.command < rValue.command;
        }
    };
    
    BOOST_DESCRIBE_STRUCT(OBACmd, (), (command))
    
    struct OBAInfo 
    {
        std::map<OBACmd, std::deque<OBACmd>> cmdinfo;
    };
    
    BOOST_DESCRIBE_STRUCT(OBAInfo, (), (cmdinfo))
    
    
    void loadFile()
    {
        try
        {
            std::deque<OBAInfo> obaInfo;
            JsonFile::loadJsonFile("./conf.json", obaInfo);
        }
        catch (const std::exception& e)
        {
            std::cout << "read error: " << e.what() << std::endl;
        }
    }
    
    void saveFile()
    {
        try
        {
            OBACmd s1 = {"key"};
            OBACmd s2 = {"value"};
    
            OBAInfo a1;
            a1.cmdinfo.emplace(s1, std::deque<OBACmd>{s2});
    
            std::deque<OBAInfo> obaInfo = {a1};
    
            JsonFile::saveJsonFile("./conf.json", obaInfo);
        }
        catch (const std::exception& e)
        {
            std::cout << e.what() << std::endl;
        }
    }
    
    int main()
    {
        saveFile();
    
        std::cout << "save done" << std::endl;
    
        loadFile();
    
        std::cout << "read done" << std::endl;
    }
    

    Content of json file is here:

    [
        {
            "cmdinfo" : [
                [
                    {
                        "command" : "key"
                    },
                    [
                        {
                            "command" : "value"
                        }
                    ]
                ]
            ]
        }
    ]
    

    output in C++20:

    save done
    read error: not an object
    read done
    

    output in C++14/17:

    save done
    read done
    

    BTW: In boost 1.78, use same develpment environment this codes is work well whether it's switch to /std::c++20 or /std::c++14 or /std::c++17

    opened by kwarehit 5
Owner
Boost.org
Boost provides free peer-reviewed portable C++ source libraries.
Boost.org
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 15.9k Aug 1, 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 553 Jul 27, 2022
Use to copy a file from an NTFS partitioned volume by reading the raw volume and parsing the NTFS structures.

ntfsDump Use to copy a file from an NTFS partitioned volume by reading the raw volume and parsing the NTFS structures. Similar to https://github.com/P

null 41 Jul 17, 2022
A C++ library for interacting with JSON.

JsonCpp JSON is a lightweight data-interchange format. It can represent numbers, strings, ordered sequences of values, and collections of name/value p

null 6.6k Aug 7, 2022
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 276 Jul 28, 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.2k Aug 6, 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
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.4k Aug 2, 2022
libcluon is a small and efficient, single-file and header-only library written in modern C++ to power microservices.

libcluon Linux & OSX Build (TravisCI) Win64 Build (AppVeyor) Test Coverage Coverity Analysis CII Best Practices libcluon is a small single-file, heade

Christian Berger 78 Jul 14, 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.1k Aug 3, 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 470 Jul 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 514 Jul 21, 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
A C++11 ASN.1 BER Encoding and Decoding Library

fast_ber A performant ASN.1 BER encoding and decoding library written in C++11 Introduction fast_ber is a small, lightweight library for BER encoding

null 69 May 22, 2022
A high performance C++14 library for effortlessly reading and writing UBJSON

UbjsonCpp A high performance C++14 library for effortlessly reading and writing UBJSON This library implements UBJSON Draft 12 and Value semmantics Ab

Ibrahim Timothy Onogu 21 Aug 2, 2022
Telepati 2 Nov 29, 2021
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 727 Jul 30, 2022