mirror of
https://github.com/nlohmann/json.git
synced 2026-09-11 18:57:58 +00:00
📝 update documentation (#4723)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
In many situations such as configuration files, missing values are not exceptional, but may be treated as if a default
|
||||
In many situations, such as configuration files, missing values are not exceptional, but may be treated as if a default
|
||||
value was present. For this case, use [`value(key, default_value)`](../../api/basic_json/value.md) which takes the key
|
||||
you want to access and a default value in case there is no value stored with that key.
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ similar to a `#!cpp std::map` and a `#!cpp std::vector`, respectively.
|
||||
| `#!cpp j["hobbies"][1]` | `#!json "reading"` |
|
||||
|
||||
The return value is a reference, so it can modify the original value. In case the passed object key is non-existing, a
|
||||
`#!json null` value is inserted which can be immediately be overwritten.
|
||||
`#!json null` value is inserted which can immediately be overwritten.
|
||||
|
||||
??? example "Write access"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user