Clears the JsonDocument
and converts it to the specified type.
JsonArray to<JsonArray>();
JsonObject to<JsonObject>();
JsonVariant to<JsonVariant>();
Example
// allocate the JsonDocument
StaticJsonDocument<200> doc;
// convert it to a JsonObject
JsonObject root = doc.to<JsonObject>();
// set values
root["hello"] = "world";
Invalidates referencesSee alsoBecause this function releases memory owned by the
JsonDocument
, it invalidates all references acquired before.Example:
DynamicJsonDocument doc(1024); JsonObject root1 = doc.to<JsonObject>(); JsonObject root2 = doc.to<JsonObject>(); // Don't use root1 here, because it's dangling!
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