mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-11-01 00:38:27 +01:00 
			
		
		
		
	Changed the array subscript to automatically add missing elements
This commit is contained in:
		| @@ -43,3 +43,11 @@ TEST_CASE("JsonDocument automatically promotes to object") { | ||||
|  | ||||
|   REQUIRE(doc["one"]["two"]["three"] == 4); | ||||
| } | ||||
|  | ||||
| TEST_CASE("JsonDocument automatically promotes to array") { | ||||
|   DynamicJsonDocument doc(4096); | ||||
|  | ||||
|   doc[2] = 2; | ||||
|  | ||||
|   REQUIRE(doc.as<std::string>() == "[null,null,2]"); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user