mirror of
https://github.com/nlohmann/json.git
synced 2026-09-30 22:15:19 +00:00
Document values and JSON pointers of json_view
- API pages for get, get_to, get_string, number_token, and value of basic_json_view; JSON pointer overloads of operator[], at, and contains; links both ways with the basic_json pages - the feature page describes which conversions copy nothing - the examples show when the view helps: strings without copies, numbers exactly as written, and paths into a large text Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -20,8 +20,11 @@ Moving the document itself does not invalidate its views: the index is heap-allo
|
||||
`basic_json_document` object.
|
||||
|
||||
`basic_json_view` provides the read-only part of the `BasicJsonType` interface: the type-inspection functions, element
|
||||
access, lookup, iteration, and [`materialize()`](materialize.md) to build the `BasicJsonType` value of a subtree on
|
||||
demand. It does not (yet) provide `get<T>()`, JSON Pointer support, `dump()`, or comparison.
|
||||
access, lookup, iteration, and conversion -- [`get<T>()`](get.md), [`get_string()`](get_string.md),
|
||||
[`number_token()`](number_token.md), and [`materialize()`](materialize.md) to build the `BasicJsonType` value of a
|
||||
subtree on demand. [`operator[]`](operator%5B%5D.md), [`at`](at.md), [`contains`](contains.md), and
|
||||
[`value`](value.md) also accept a [`json_pointer`](../json_pointer/index.md). It does not (yet) provide `dump()` or
|
||||
comparison.
|
||||
|
||||
## Template parameters
|
||||
|
||||
@@ -72,6 +75,7 @@ demand. It does not (yet) provide `get<T>()`, JSON Pointer support, `dump()`, or
|
||||
|
||||
- [**at**](at.md) - access specified element with bounds checking
|
||||
- [**operator[]**](operator[].md) - access specified element
|
||||
- [**value**](value.md) - access specified element with default value
|
||||
- [**front**](front.md) - access the first element
|
||||
- [**back**](back.md) - access the last element
|
||||
|
||||
@@ -96,6 +100,10 @@ demand. It does not (yet) provide `get<T>()`, JSON Pointer support, `dump()`, or
|
||||
|
||||
### Conversion
|
||||
|
||||
- [**get**](get.md) - get a value
|
||||
- [**get_to**](get_to.md) - get a value and write it to a destination
|
||||
- [**get_string**](get_string.md) - get a string value without a copy
|
||||
- [**number_token**](number_token.md) - get a number's token text without a copy
|
||||
- [**materialize**](materialize.md) - build the `BasicJsonType` value of this subtree
|
||||
|
||||
### Source access
|
||||
|
||||
Reference in New Issue
Block a user