Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 902 Bytes

decode_ubjson.md

File metadata and controls

29 lines (17 loc) · 902 Bytes

jsoncons::ubjson::decode_ubjson

Decodes a Universal Binary JSON Specification (JSON) data format into a C++ data structure.

#include <jsoncons_ext/ubjson/ubjson.hpp>

template<class T>
T decode_ubjson(const std::vector<uint8_t>& v); // (1)

template<class T>
T decode_ubjson(std::istream>& is); // (2)

(1) Reads a UBJSON bytes buffer into a type T if T is an instantiation of basic_json or if T supports json_type_traits.

(2) Reads a UBJSON binary stream into a type T if T is an instantiation of basic_json or if T supports json_type_traits.

Exceptions

Throws ser_error if parsing fails.

See also