mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
MemberProxy.link()
This commit is contained in:
@@ -277,3 +277,11 @@ TEST_CASE("MemberProxy::createNestedObject(key)") {
|
||||
|
||||
CHECK(doc["status"]["weather"]["temp"] == 42);
|
||||
}
|
||||
|
||||
TEST_CASE("MemberProxy::link()") {
|
||||
StaticJsonDocument<1024> doc1, doc2;
|
||||
doc1["obj"].link(doc2);
|
||||
doc2["hello"] = "world";
|
||||
|
||||
CHECK(doc1.as<std::string>() == "{\"obj\":{\"hello\":\"world\"}}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user