Description

JsonArrayConst is a read-only version of JsonArray.

Example

// compute the required size
const size_t CAPACITY = JSON_ARRAY_SIZE(3);

// allocate the memory for the document
StaticJsonDocument<CAPACITY> doc;

// parse a JSON array
deserializeJson(doc, "[1,2,3]");

// extract the values
JsonArrayConst array = doc.as<JsonArray>();
for(JsonVariantConst v : array) {
    Serial.println(v.as<int>());
}

Member functions