mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Updated example
This commit is contained in:
		| @@ -23,17 +23,17 @@ void setup() | |||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     char* sensor = root.getString("sensor"); |     char* sensor = root["sensor"]; | ||||||
|     Serial.println(sensor); |     Serial.println(sensor); | ||||||
|  |  | ||||||
|     long time = root.getLong("time"); |     long time = root["time"]; | ||||||
|     Serial.println(time); |     Serial.println(time); | ||||||
|      |      | ||||||
|     JsonArray coords = root.getArray("data"); |     JsonArray coords = root["data"]; | ||||||
|      |      | ||||||
|     for (int i = 0; i < coords.getLength(); i++) |     for (int i = 0; i < coords.size(); i++) | ||||||
|     { |     { | ||||||
|         double value = coords.getDouble(i); |         double value = coords[i]; | ||||||
|         Serial.println(value, 6); |         Serial.println(value, 6); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user