mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +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:
		| @@ -76,7 +76,7 @@ void loop() { | ||||
|   } | ||||
|  | ||||
|   Serial.print(F("Sending: ")); | ||||
|   root.printTo(Serial); | ||||
|   serializeJson(root, Serial); | ||||
|   Serial.println(); | ||||
|  | ||||
|   // Write response headers | ||||
| @@ -86,7 +86,7 @@ void loop() { | ||||
|   client.println(); | ||||
|  | ||||
|   // Write JSON document | ||||
|   root.prettyPrintTo(client); | ||||
|   serializeJsonPretty(root, client); | ||||
|  | ||||
|   // Disconnect | ||||
|   client.stop(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user