forked from bblanchon/ArduinoJson
Return JsonArray and JsonObject by value (closes #309)
This commit is contained in:
1 parent
4fe2b1100e
commit
b105e6f7c4
93 files changed
+983
-1091
No files matched your search
@@ -12,7 +12,7 @@ TEST_CASE("JsonArray::copyTo()") {
|
||||
char json[] = "[1,2,3]";
|
||||
DeserializationError err = deserializeJson(doc, json);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
JsonArray& array = doc.as<JsonArray>();
|
||||
JsonArray array = doc.as<JsonArray>();
|
||||
|
||||
int destination[4] = {0};
|
||||
size_t result = array.copyTo(destination);
|
||||
@@ -28,7 +28,7 @@ TEST_CASE("JsonArray::copyTo()") {
|
||||
char json[] = "[1,2,3]";
|
||||
DeserializationError err = deserializeJson(doc, json);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
JsonArray& array = doc.as<JsonArray>();
|
||||
JsonArray array = doc.as<JsonArray>();
|
||||
|
||||
int destination[2] = {0};
|
||||
size_t result = array.copyTo(destination);
|
||||
@@ -43,7 +43,7 @@ TEST_CASE("JsonArray::copyTo()") {
|
||||
|
||||
DeserializationError err = deserializeJson(doc, json);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
JsonArray& array = doc.as<JsonArray>();
|
||||
JsonArray array = doc.as<JsonArray>();
|
||||
|
||||
int destination[3][2] = {{0}};
|
||||
array.copyTo(destination);
|
||||
|
||||
Reference in new issue
Block a user