The single features/json_view.md page grew to ~600 lines covering eight
topics. Split it into features/json_view/ with an overview page and
pages for ownership and lifetime, differences from basic_json, reading
values, generic code, editing, and images.
The new differences page collects what was spread over several sections
("What is the same", "What is different", "Duplicate keys", and notes in
the conversion and serialization sections) under one summary table, and
adds the parts of the basic_json interface a view does not have. The
other pages now link to it instead of restating the rules.
Internal links across the documentation point to the new pages.
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
1.4 KiB
1.4 KiB
nlohmann::ordered_json_editable_view
Defined in header <nlohmann/json_view.hpp>
using ordered_json_editable_view = basic_json_view<ordered_json, view_mode::editable>;
This type is a basic_json_view of a value of an
ordered_json_editable_document, the corresponding view for
ordered_json_view the way json_editable_view is for
json_view.
Examples
??? example
The example below is the same as [`ordered_json_editable_document`'s](ordered_json_editable_document.md): the
views `set` returns see the document's member order preserved on `materialize()`, unlike for a
[`json_editable_document`](json_editable_document.md).
```cpp
--8<-- "examples/ordered_json_editable_document.cpp"
```
Output:
```json
--8<-- "examples/ordered_json_editable_document.output"
```
See also
ordered_json_editable_document- the document type this view refers intoordered_json_view- the corresponding read-only viewjson_editable_view- the corresponding view forjson_editable_document- Zero-copy JSON views - editing a document in place and writing it back
Version history
Added in version 3.13.0.