JsonArrayConst
is a read-only version of JsonArray
. It’s also twice smaller because it doesn’t contain a pointer to the memory pool.
// 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4