The builder and the edit functions take and store a node_kind instead of casting a value_t; the numbering assertions and the comments now speak of node_kind, and the link kind notes that it follows value_t::discarded. The read-only aliases name view_mode::read_only like the editable ones. view_mode.md says the mode is a compile-time property of the type. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
757 B
757 B
nlohmann::json_view
Defined in header <nlohmann/json_view.hpp>
using json_view = basic_json_view<json, view_mode::read_only>;
This type is a basic_json_view of a value of a json_document.
Examples
??? example
The example below demonstrates how to use the type `nlohmann::json_view`.
```cpp
--8<-- "examples/json_view.cpp"
```
Output:
```json
--8<-- "examples/json_view.output"
```
See also
- json_document - the document type this view refers into
- ordered_json_view - the corresponding view for
ordered_json_document
Version history
Added in version 3.13.0.