forked from bblanchon/ArduinoJson
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:
1 parent
7a2a64803a
commit
83d73c93f7
38 files changed
+238
-233
No files matched your search
@@ -72,11 +72,11 @@ void loop() {
|
||||
Serial.print(remoteIp);
|
||||
Serial.print(F(" on port "));
|
||||
Serial.println(remotePort);
|
||||
root.printTo(Serial);
|
||||
serializeJson(root, Serial);
|
||||
|
||||
// Send UDP packet
|
||||
udp.beginPacket(remoteIp, remotePort);
|
||||
root.printTo(udp);
|
||||
serializeJson(root, udp);
|
||||
udp.println();
|
||||
udp.endPacket();
|
||||
|
||||
|
||||
Reference in new issue
Block a user