mirror of
https://github.com/nlohmann/json.git
synced 2025-06-09 00:12:48 +08:00

* 🔥 consolidate documentation * ♻️ overwork std specializations * 🚚 move images files to mkdocs * ♻️ fix URLs * 🔧 tweak MkDocs configuration * 🔧 add namespaces * 📝 document deprecations * 📝 document documentation generation * 🚸 improve search * 🚸 add examples * 🚧 start adding documentation for macros * 📝 add note for https://github.com/nlohmann/json/issues/874#issuecomment-1001699139 * 📝 overwork example handling * 📝 fix Markdown tables
20 lines
428 B
Markdown
20 lines
428 B
Markdown
# 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"
|
|
```
|
|
|
|
## See also
|
|
|
|
- Class [`json_pointer`](../api/json_pointer/index.md)
|