docs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
:sig
|
||||
DValue* DValue::get_or_create(String s)
|
||||
|
||||
:params
|
||||
s : child key to create or return
|
||||
return value : pointer to the child node
|
||||
|
||||
:see
|
||||
0_DValue
|
||||
2_DValue_key
|
||||
2_DValue_has
|
||||
|
||||
:content
|
||||
Ensures the value is map-shaped and returns the named child. If the key does not exist, an empty child is created. Creating a non-numeric key on a list-shaped value clears list mode.
|
||||
|
||||
```cpp
|
||||
payload.get_or_create("headers")->get_or_create("Content-Type")->set("text/plain");
|
||||
```
|
||||
Reference in New Issue
Block a user