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

Function custom_functions2

examples/src/jsonpath_examples.cpp:796–806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

794}
795
796void custom_functions2()
797{
798 my_custom_functions<jsoncons::json> funcs;
799
800 auto root = jsoncons::json::parse(R"([{"foo": 60, "bar": 10},{"foo": 60, "bar": 5}])");
801 std::cout << pretty_print(root) << "\n\n";
802
803 jsoncons::json result = jsonpath::json_query(root, "$[?(divide(@.foo, @.bar) == 6)]", jsonpath::result_options(), funcs);
804
805 std::cout << pretty_print(result) << "\n\n";
806}
807
808void make_expression_with_stateful_allocator()
809{

Callers 1

mainFunction · 0.85

Calls 4

parseFunction · 0.85
pretty_printFunction · 0.85
json_queryFunction · 0.85
result_optionsEnum · 0.85

Tested by

no test coverage detected