mirror of
https://github.com/nlohmann/json.git
synced 2026-09-30 14:05:18 +00:00
Add API reference pages for basic_json_document::insert and basic_json_document::erase, matching the style of set.md and push_back.md: signatures, parameters, return values, exception safety, exceptions with their exact ids and messages, complexity, notes on duplicate keys and view/iterator validity, and an example. Add example programs basic_json_document__insert.cpp and basic_json_document__erase.cpp with their expected output, each comparing an edit on an editable document with the same edit on a plain json value to show what is preserved: member order, the spelling of untouched numbers, and, for insert, that a view taken before the insert keeps referring to the same element after its index shifts. Register both new pages in mkdocs.yml, docSet.sql, and the member list of basic_json_document/index.md, add cross-references to them from set.md and push_back.md, and mention insert/erase in the "Editing a document" section of features/json_view.md. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
19 lines
178 B
Plaintext
19 lines
178 B
Plaintext
1
|
|
{
|
|
"name": "cache",
|
|
"host": "db1",
|
|
"price": 19.90,
|
|
"replicas": [
|
|
"db4"
|
|
]
|
|
}
|
|
|
|
{
|
|
"host": "db1",
|
|
"name": "cache",
|
|
"price": 19.9,
|
|
"replicas": [
|
|
"db4"
|
|
]
|
|
}
|