mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Replaced printTo() with serializeJson()
				
					
				
			* Added `serializeJson()` and `serializeJsonPretty()` * Added `measureJson()` and `measureJsonPretty()` * Removed `printTo()` and `prettyPrintTo()` * Removed `measureLength()` and `measurePrettyLength()`
This commit is contained in:
		| @@ -38,13 +38,13 @@ void setup() { | ||||
|   data.add(48.756080); | ||||
|   data.add(2.302038); | ||||
|  | ||||
|   root.printTo(Serial); | ||||
|   serializeJson(root, Serial); | ||||
|   // This prints: | ||||
|   // {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]} | ||||
|  | ||||
|   Serial.println(); | ||||
|  | ||||
|   root.prettyPrintTo(Serial); | ||||
|   serializeJsonPretty(root, Serial); | ||||
|   // This prints: | ||||
|   // { | ||||
|   //   "sensor": "gps", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user