MCPcopy Create free account
hub / github.com/alibaba/yalantinglibs / example2

Function example2

src/struct_json/examples/user_defined_struct.cpp:48–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46};
47
48void example2() {
49 nest v{"Hi", {1, 2, 3}}, v2;
50 std::string s;
51 struct_json::to_json(v, s);
52 std::cout << s << std::endl;
53 struct_json::from_json(v2, s);
54 assert(v == v2);
55};
56
57void test_user_defined_struct() {
58 example1();

Callers 1

test_user_defined_structFunction · 0.70

Calls 2

to_jsonFunction · 0.85
from_jsonFunction · 0.85

Tested by 1

test_user_defined_structFunction · 0.56