mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Minor changes in the examples
This commit is contained in:
		| @@ -11,7 +11,7 @@ void setup() { | |||||||
|   Serial.begin(9600); |   Serial.begin(9600); | ||||||
|   while (!Serial) continue; |   while (!Serial) continue; | ||||||
|  |  | ||||||
|   // The JSON document |   // Allocate the JSON document | ||||||
|   // |   // | ||||||
|   // Inside the brackets, 200 is the RAM allocated to this document. |   // Inside the brackets, 200 is the RAM allocated to this document. | ||||||
|   // Don't forget to change this value to match your requirement. |   // Don't forget to change this value to match your requirement. | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ void setup() { | |||||||
|   Serial.begin(9600); |   Serial.begin(9600); | ||||||
|   while (!Serial) continue; |   while (!Serial) continue; | ||||||
|  |  | ||||||
|   // Root JSON object |   // Allocate the JSON document | ||||||
|   // |   // | ||||||
|   // Inside the brackets, 200 is the size of the memory pool in bytes. |   // Inside the brackets, 200 is the size of the memory pool in bytes. | ||||||
|   // Don't forget to change this value to match your JSON document. |   // Don't forget to change this value to match your JSON document. | ||||||
| @@ -47,7 +47,7 @@ void setup() { | |||||||
|   // Fetch values. |   // Fetch values. | ||||||
|   // |   // | ||||||
|   // Most of the time, you can rely on the implicit casts. |   // Most of the time, you can rely on the implicit casts. | ||||||
|   // In other case, you can do doc["time"].as<long>(); |   // In other case, you can do root["time"].as<long>(); | ||||||
|   const char* sensor = root["sensor"]; |   const char* sensor = root["sensor"]; | ||||||
|   long time = root["time"]; |   long time = root["time"]; | ||||||
|   double latitude = root["data"][0]; |   double latitude = root["data"][0]; | ||||||
|   | |||||||
| @@ -60,7 +60,7 @@ void setup() { | |||||||
|   // Fetch values. |   // Fetch values. | ||||||
|   // |   // | ||||||
|   // Most of the time, you can rely on the implicit casts. |   // Most of the time, you can rely on the implicit casts. | ||||||
|   // In other case, you can do doc["time"].as<long>(); |   // In other case, you can do root["time"].as<long>(); | ||||||
|   const char* sensor = root["sensor"]; |   const char* sensor = root["sensor"]; | ||||||
|   long time = root["time"]; |   long time = root["time"]; | ||||||
|   double latitude = root["data"][0]; |   double latitude = root["data"][0]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user