mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Don't use JsonBuffer to create or parse objects and arrays.
* Added DynamicJsonArray and StaticJsonArray * Added DynamicJsonObject and StaticJsonObject * Added DynamicJsonVariant and StaticJsonVariant * Added deserializeJson() * Removed JsonBuffer::parseArray(), parseObject() and parse() * Removed JsonBuffer::createArray() and createObject()
This commit is contained in:
@@ -134,6 +134,16 @@ class JsonVariant : public Internals::JsonVariantBase<JsonVariant> {
|
||||
// if the variant is converted back to a JsonObject&
|
||||
JsonVariant(const JsonObject &object);
|
||||
|
||||
JsonVariant(JsonArray *array) {
|
||||
_content.asArray = array;
|
||||
_type = Internals::JSON_ARRAY;
|
||||
}
|
||||
|
||||
JsonVariant(JsonObject *object) {
|
||||
_content.asObject = object;
|
||||
_type = Internals::JSON_OBJECT;
|
||||
}
|
||||
|
||||
// Get the variant as the specified type.
|
||||
//
|
||||
// char as<char>() const;
|
||||
@@ -352,4 +362,4 @@ DEPRECATED("Decimal places are ignored, use the double value instead")
|
||||
inline JsonVariant double_with_n_digits(double value, uint8_t) {
|
||||
return JsonVariant(value);
|
||||
}
|
||||
}
|
||||
} // namespace ArduinoJson
|
||||
|
||||
Reference in New Issue
Block a user