Description

JsonObjectConst is a read-only version of JsonObject.

Example

// allocate the memory for the document
const size_t CAPACITY = JSON_OBJECT_SIZE(1);
StaticJsonDocument<CAPACITY> doc;

// deserialize the object
char json[] = "{\"hello\":\"world\"}";
deserializeJson(doc, json);

// extract the data
JsonObjectConst object = doc.as<JsonObject>();
const char* world = object["hello"];

Member functions

See also