ArduinoJson: API Reference

JsonObject::size()

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
Fork me on GitHub