Description

Returns the number of key/value pairs in the object.

Signature

size_t size() const;

Return value

An unsigned integer containing the number of key/value pairs in the object.

Example

JsonObject& object = jsonBuffer.createObject();
object["hello"] = "world";
Serial.println(object.size()); // 1

See also

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