I have the following as part of a sketch that gets API data from Open Weather.
This works fine if I download the 'daily' API string that is, on average, 4156 characters long.
If I try to download more data with the 'hourly' API then the download fails Serial.print("parseObject() failed);
My question is, how long a string can I download? Is there a limit set by this code or within the Json library?
I have tried changing the #define JSON_BUFF_DIMENSION 2500 value but still no joy.
#include <ArduinoJson.h>
#define JSON_BUFF_DIMENSION 2500
text.reserve(JSON_BUFF_DIMENSION);
void parseJson(const char * jsonString) {
DynamicJsonBuffer jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(jsonString);
if (!root.success()) {
Serial.println("parseObject() failed");
return;
}
void.loop(){
//display stuff
}