CBOR C++ serialization library
C++ C CMake
Switch branches/tags
Nothing to show
Clone or download
Latest commit f792fa9 Apr 16, 2018
Permalink
Failed to load latest commit information.
src decoder-neg-int-fix Feb 16, 2017
.gitignore cleanup Jan 6, 2015
CMakeLists.txt refactoring, decomposition, update Apr 22, 2015
README.md

README.md

cbor-cpp

Gitter

CBOR C++ serialization library

Just a simple SAX-like Concise Binary Object Representation (CBOR).

http://tools.ietf.org/html/rfc7049

Examples

    cbor::output_dynamic output;

    { //encoding
        cbor::encoder encoder(output);
        encoder.write_array(5);
        {
            encoder.write_int(123);
            encoder.write_string("bar");
            encoder.write_int(321);
            encoder.write_int(321);
            encoder.write_string("foo");
        }
    }

    { // decoding
        cbor::input input(output.data(), output.size());
        cbor::listener_debug listener;
        cbor::decoder decoder(input, listener);
        decoder.run();
    }