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

Function jsonpointer_contains

examples/src/jsonpointer_examples.cpp:65–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void jsonpointer_contains()
66{
67 // Example from RFC 6901
68 auto j = json::parse(R"(
69 {
70 "foo": ["bar", "baz"],
71 "": 0,
72 "a/b": 1,
73 "c%d": 2,
74 "e^f": 3,
75 "g|h": 4,
76 "i\\j": 5,
77 "k\"l": 6,
78 " ": 7,
79 "m~n": 8
80 }
81 )");
82
83 std::cout << "(1) " << jsonpointer::contains(j, "/foo/0") << '\n';
84 std::cout << "(2) " << jsonpointer::contains(j, "e^g") << '\n';
85}
86
87void jsonpointer_select_author()
88{

Callers 1

mainFunction · 0.85

Calls 2

parseFunction · 0.85
containsFunction · 0.50

Tested by

no test coverage detected