Description

JsonObjectConst is a read-only version of JsonObject. It’s also twice smaller because it doesn’t contain a pointer to the memory pool.

Example

JsonDocument 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