mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Updated example
This commit is contained in:
		| @@ -23,17 +23,17 @@ void setup() | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     char* sensor = root.getString("sensor"); | ||||
|     char* sensor = root["sensor"]; | ||||
|     Serial.println(sensor); | ||||
|  | ||||
|     long time = root.getLong("time"); | ||||
|     long time = root["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); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user