Skip to content

Commit 787f3b0

Browse files
committed
Fixed final convertion issues to ArduinoJson6
1 parent 4a0b0a6 commit 787f3b0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/CloudStorage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class BaseCloudStorage {
119119
// TODO: handle error
120120
return cloud_storage_utils::ResultWrapper<Ty>(
121121
!root["error"],
122-
getValueByKey<Ty>(root["result"].as<JsonObject>(), key)
122+
getValueByKey<Ty>(root["result"], key)
123123
);
124124
}
125125

@@ -395,7 +395,7 @@ class BaseCloudStorage {
395395
// Method for accessing nested json objects with '.' seperated keys.
396396
// for examples "name.first.english" for accessing name:{.., first:{ english: "MyName", .... }}
397397
template <class Type>
398-
Type getValueByKey(JsonObject& root, String key) {
398+
Type getValueByKey(JsonObject root, String key) {
399399
// in case no '.' is in the key, return the corresponding value
400400
if(key.indexOf('.') == -1) return root[key];
401401

@@ -432,7 +432,7 @@ class BaseCloudStorage {
432432
// TODO: handle error
433433
return cloud_storage_utils::ResultWrapper<Ty>(
434434
!root["error"],
435-
getValueByKey<Ty>(root["result"].as<JsonObject>(), key)
435+
getValueByKey<Ty>(root["result"], key)
436436
);
437437
}
438438

src/Utils/AnyValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AnyValue {
88

99
template <class Ty>
1010
Ty as() {
11-
DynamicJsonDocument root;
11+
DynamicJsonDocument root(1024);
1212
deserializeJson(root, _jsonData);
1313

1414
Ty result = root["result"]["value"];

0 commit comments

Comments
 (0)