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

Function json_example

examples/src/json_traits_bitset_examples.cpp:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13using namespace jsoncons;
14
15void json_example()
16{
17 std::bitset<70> bs1(ULLONG_MAX);
18
19 std::string s;
20 encode_json(bs1, s);
21 std::cout << s << "\n\n";
22
23 auto bs2 = decode_json<std::bitset<70>>(s);
24
25 assert(bs2 == bs1);
26}
27
28void cbor_example()
29{

Callers 1

mainFunction · 0.85

Calls 1

encode_jsonFunction · 0.85

Tested by

no test coverage detected