Files
json/docs/mkdocs/docs/api/ordered_json_editable_view.md
Niels Lohmann d04f78864c Document editable json_documents
- API pages for set and push_back of basic_json_document and for the
  editable aliases; the class overviews name the Editable parameter
- type_error.319 on the exceptions page
- the feature page explains editing, and the examples show when it
  helps: a configuration file changed without reformatting it

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-09-30 21:02:05 +02:00

1.3 KiB

nlohmann::ordered_json_editable_view

Defined in header <nlohmann/json_view.hpp>

using ordered_json_editable_view = basic_json_view<ordered_json, true>;

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

Version history

Since version 3.13.0.