MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / encode_cbor_byte_string

Function encode_cbor_byte_string

examples/src/cbor_examples.cpp:161–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void encode_cbor_byte_string()
162{
163 // construct byte string value
164 json j(byte_string{'H','e','l','l','o'});
165
166 std::vector<uint8_t> buf;
167 cbor::encode_cbor(j, buf);
168
169 std::cout << byte_string_view(buf) << "\n\n";
170
171 json j2 = cbor::decode_cbor<json>(buf);
172 std::cout << "(2) " << j2 << '\n';
173}
174
175void encode_byte_string_with_encoding_hint()
176{

Callers 1

mainFunction · 0.85

Calls 2

encode_cborFunction · 0.85
byte_string_viewClass · 0.85

Tested by

no test coverage detected