This commit is contained in:
nlohmann
2026-10-02 15:15:16 +00:00
parent 0c49bb37a5
commit 2aaa1d24ef
346 changed files with 1687 additions and 1033 deletions
File diff suppressed because one or more lines are too long
+10 -9
View File
@@ -6,15 +6,15 @@ void clear() noexcept;
Clears the content of a JSON value and resets it to the default value as if [`basic_json(value_t)`](https://json.nlohmann.me/api/basic_json/basic_json/index.md) would have been called with the current value type from [`type()`](https://json.nlohmann.me/api/basic_json/type/index.md):
| Value type | initial value |
| ---------- | -------------------- |
| null | `null` |
| boolean | `false` |
| string | `""` |
| number | `0` |
| binary | An empty byte vector |
| object | `{}` |
| array | `[]` |
| Value type | initial value |
| ---------- | ------------------------------------ |
| null | `null` |
| boolean | `false` |
| string | `""` |
| number | `0` |
| binary | An empty byte vector with no subtype |
| object | `{}` |
| array | `[]` |
Has the same effect as calling
@@ -93,3 +93,4 @@ false
- Added in version 1.0.0.
- Added support for binary types in version 3.8.0.
- Fixed in version 3.13.0 to also clear the subtype of a binary value; before, the subtype was left unchanged.