mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Use operator[] in example (-68 bytes)
This commit is contained in:
		| @@ -16,9 +16,9 @@ void setup() | |||||||
|     array.add<6>(2.302038);  // if not specified, 2 digits are printed |     array.add<6>(2.302038);  // if not specified, 2 digits are printed | ||||||
|  |  | ||||||
|     JsonObject<3> root;  |     JsonObject<3> root;  | ||||||
|     root.add("sensor", "gps"); |     root["sensor"] = "gps"; | ||||||
|     root.add("time", 1351824120); |     root["time"] = 1351824120; | ||||||
|     root.add("data", array); |     root["data"] = array; | ||||||
|  |  | ||||||
|     Serial.print(root); // {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]} |     Serial.print(root); // {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]} | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user