|
JSON for Modern C++
3.0
|
|
inlinenoexcept |
Clears the content of a JSON value and resets it to the default value as if basic_json(value_t) would have been called:
| Value type | initial value |
|---|---|
| null | null |
| boolean | false |
| string | "" |
| number | 0 |
| object | {} |
| array | [] |
0.0 which will be serialized to 0. The vale type remains number_float_t.null
false
0
0
{}
[]
""
The example code above can be translated withg++ -std=c++11 -Isrc doc/examples/clear.cpp -o clear.