Created nlohmann::basic_json::clear (markdown)

Niels committed 2015-04-12 16:32:02 +02:00
1 parent 8d041136e4
commit 9418570b68
1 file changed
+32
+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`.