mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Added as<JsonArray>() as a synonym for as<JsonArray&>()... (issue #291)
This commit is contained in:
@@ -106,7 +106,7 @@ class JsonObject : public Internals::JsonPrintable<JsonObject>,
|
||||
|
||||
// Gets the value associated with the specified key.
|
||||
template <typename T>
|
||||
T get(JsonObjectKey key) const {
|
||||
typename Internals::JsonVariantAs<T>::type get(JsonObjectKey key) const {
|
||||
node_type* node = getNodeAt(key.c_str());
|
||||
return node ? node->content.value.as<T>() : JsonVariant::defaultValue<T>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user