Created nlohmann::basic_json::clear (markdown)
1 parent
8d041136e4
commit
9418570b68
1 file changed
+32
@@ -0,0 +1,32 @@
|
|||||||
|
```cpp
|
||||||
|
void clear();
|
||||||
|
```
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Removes all elements from the container. The resulting value depends on the different value types and is defined as follows:
|
||||||
|
|
||||||
|
| Value type | JSON value |
|
||||||
|
| ---------- | --------------------- |
|
||||||
|
| null | `null` |
|
||||||
|
| boolean | `false` |
|
||||||
|
| string | `""` |
|
||||||
|
| number | `0` |
|
||||||
|
| object | `{}` |
|
||||||
|
| array | `[]` |
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
## Return value
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
## Complexity
|
||||||
|
|
||||||
|
Linear in the size of the container.
|
||||||
|
|
||||||
|
## Exceptions
|
||||||
|
|
||||||
|
None. The function's noexcept-specification is `noexcept`.
|
||||||
Reference in new issue
Block a user