2020-05-24 14:03:04 +03: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"
|
|
|
|
|
```
|
2021-11-06 01:29:15 +03:00
|
|
|
|
|
|
|
|
## See also
|
|
|
|
|
|
|
|
|
|
- Class [`json_pointer`](../api/json_pointer/index.md)
|