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

Function erase3

examples/src/erase_examples.cpp:88–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void erase3()
89{
90 try
91 {
92 // Read from input file
93 std::istringstream is(input);
94 json instance = json::parse(is);
95
96 // Remove first record identified by JSONPointer
97 jsonpointer::remove(instance, "/0");
98
99 // Write to output file
100 std::ostringstream os;
101 instance.dump_pretty(os);
102 std::cout << os.str() << "\n\n";
103 }
104 catch (const std::exception& e)
105 {
106 std::cout << e.what() << '\n';
107 }
108}
109
110int main()
111{

Callers 1

mainFunction · 0.85

Calls 3

parseFunction · 0.85
removeFunction · 0.50
whatMethod · 0.45

Tested by

no test coverage detected