nlohmann::basic_json::to_cbor

create a CBOR serialization of a given JSON value

Synopsis

Declared in <nlohmann/json.hpp>

static
std::vector<uint8_t>
to_cbor(basic_json const& j);

Return Value

a CBOR serialization of j as a byte vector

Parameters

NameDescription
jJSON value to serialize