cleanup, docs
This commit is contained in:
@@ -5,12 +5,14 @@ bool DValue::is_array() const
|
||||
return value : true when the dereferenced value is map-shaped
|
||||
|
||||
:see
|
||||
>types
|
||||
0_DValue
|
||||
2_DValue_is_list
|
||||
|
||||
:content
|
||||
Returns true when the value's current type is `M`, the map/list container type. It does not require contiguous numeric keys; use `is_list()` for that.
|
||||
|
||||
```cpp
|
||||
if(payload.get_by_path("items").is_array()) { /* has children */ }
|
||||
```
|
||||
:example
|
||||
DValue user;
|
||||
user["name"] = "Ada";
|
||||
print(user.is_array() ? "array\n" : "scalar\n");
|
||||
|
||||
Reference in New Issue
Block a user