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

Function int32_example

examples/src/bson_examples.cpp:101–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void int32_example()
102{
103 ojson j(jsoncons::json_object_arg);
104 j.try_emplace("a", -123); // int32
105 j.try_emplace("c", 0); // int32
106 j.try_emplace("b", 123); // int32
107
108 std::vector<char> buffer;
109 bson::encode_bson(j, buffer);
110 std::cout << jsoncons::byte_string_view(buffer) << "\n\n";
111}
112
113void int64_example()
114{

Callers 1

mainFunction · 0.85

Calls 3

encode_bsonFunction · 0.85
byte_string_viewClass · 0.85
try_emplaceMethod · 0.45

Tested by

no test coverage detected