d2tweaks-rnd2k/vendor/json/doc/mkdocs/docs/features/json_pointer.md

16 lines
359 B
Markdown
Raw Normal View History

2024-08-07 20:54:51 +00:00
# JSON Pointer
The library supports **JSON Pointer** ([RFC 6901](https://tools.ietf.org/html/rfc6901)) as alternative means to address structured values.
```cpp
// a JSON value
json j_original = R"({
"baz": ["one", "two", "three"],
"foo": "bar"
})"_json;
// access members with a JSON pointer (RFC 6901)
j_original["/baz/1"_json_pointer];
// "two"
```