mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 08:48:27 +01:00
Return JsonArray and JsonObject by value (closes #309)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
TEST_CASE("serialize JsonArray to std::string") {
|
||||
DynamicJsonDocument doc;
|
||||
JsonArray &array = doc.to<JsonArray>();
|
||||
JsonArray array = doc.to<JsonArray>();
|
||||
array.add(4);
|
||||
array.add(2);
|
||||
|
||||
@@ -28,7 +28,7 @@ TEST_CASE("serialize JsonArray to std::string") {
|
||||
|
||||
TEST_CASE("serialize JsonObject to std::string") {
|
||||
DynamicJsonDocument doc;
|
||||
JsonObject &obj = doc.to<JsonObject>();
|
||||
JsonObject obj = doc.to<JsonObject>();
|
||||
obj["key"] = "value";
|
||||
|
||||
SECTION("object") {
|
||||
|
||||
Reference in New Issue
Block a user