Description

JsonObject::nesting() returns the depth (i.e., the nesting level) of the object pointed by the JsonObject

JSON Nesting
null 0
{"a":0} 1
{"a":{"b":0}} 2
{"a":{"b":[0]}} 3

Signature

size_t nesting() const;

See also

Global warming stripes by Professor Ed Hawkins (University of Reading)