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

Function json_replace_example1

examples/src/jsonpath_examples.cpp:332–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332void json_replace_example1()
333{
334 std::ifstream is("./input/books.json");
335 auto data =jsoncons::json::parse(is);
336
337 jsonpath::json_replace(data,"$.books[?(@.title == 'A Wild Sheep Chase')].price",20.0);
338 std::cout << pretty_print(data) << "\n\n";
339}
340
341void json_replace_example2()
342{

Callers 1

mainFunction · 0.85

Calls 3

parseFunction · 0.85
json_replaceFunction · 0.85
pretty_printFunction · 0.85

Tested by

no test coverage detected