Closed JHershey69 closed 4 years ago
Using 6.14.1 and associated assistant for parsing program. Attempting to parse from http.get() but compiler doesn't like this code:
if (httpCode > 0) { Serial.println("Connection to Dark Sky sucessful!"); const size_t capacity = 686; DynamicJsonDocument doc(capacity);
deserializeJson(doc, http.getString()); float latitude = doc["latitude"]; // 37.8267 float longitude = doc["longitude"]; // -122.4233 const char* timezone = doc["timezone"]; // "America/Los_Angeles"
..... more code after but error happening at DynamicJsonDocument line
Worked it out. Works great once I actually include the library. :)
Using 6.14.1 and associated assistant for parsing program. Attempting to parse from http.get() but compiler doesn't like this code:
if (httpCode > 0) { Serial.println("Connection to Dark Sky sucessful!"); const size_t capacity = 686; DynamicJsonDocument doc(capacity);
..... more code after but error happening at DynamicJsonDocument line