mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Add JsonVariant::link() (resolves #1343)
				
					
				
			This commit is contained in:
		| @@ -245,3 +245,11 @@ TEST_CASE("ElementProxy cast to JsonVariant") { | ||||
|  | ||||
|   CHECK(doc.as<std::string>() == "[\"toto\"]"); | ||||
| } | ||||
|  | ||||
| TEST_CASE("ElementProxy::link()") { | ||||
|   StaticJsonDocument<1024> doc1, doc2; | ||||
|   doc1[0].link(doc2); | ||||
|   doc2["hello"] = "world"; | ||||
|  | ||||
|   CHECK(doc1.as<std::string>() == "[{\"hello\":\"world\"}]"); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user