mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Added links to the ArduinoJson assistant (issue #513)
This commit is contained in:
		| @@ -2,9 +2,9 @@ | ||||
| // Created by Benoit Blanchon. | ||||
| // Heavily inspired by "Web Server" from David A. Mellis and Tom Igoe | ||||
|  | ||||
| #include <SPI.h> | ||||
| #include <Ethernet.h> | ||||
| #include <ArduinoJson.h> | ||||
| #include <Ethernet.h> | ||||
| #include <SPI.h> | ||||
|  | ||||
| byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; | ||||
| IPAddress ip(192, 168, 0, 177); | ||||
| @@ -64,6 +64,8 @@ void loop() { | ||||
|   if (client) { | ||||
|     bool success = readRequest(client); | ||||
|     if (success) { | ||||
|       // Use https://bblanchon.github.io/ArduinoJson/assistant/ to | ||||
|       // compute the right size for the buffer | ||||
|       StaticJsonBuffer<500> jsonBuffer; | ||||
|       JsonObject& json = prepareResponse(jsonBuffer); | ||||
|       writeResponse(client, json); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user