'DynamicJsonDocument' was not declared in this scope
JHershey69 opened this issue · comments
Jessica Hershey commented
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
Jessica Hershey commented
Worked it out. Works great once I actually include the library. :)