|
JSON for Modern C++
3.0
|
|
inlinenoexcept |
Returns the number of elements in a JSON value.
| Value type | return value |
|---|---|
| null | 0 |
| boolean | 1 |
| string | 1 |
| number | 1 |
| object | result of function object_t::size() |
| array | result of function array_t::size() |
0 1 1 1 2 0 5 0 1The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/size.cpp -o size.