File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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" ];
You can’t perform that action at this time.
0 commit comments