Increase ESP32 compatibility

This commit is contained in:
Theo Arends 2020-04-13 13:01:54 +02:00
parent f345cc78b2
commit 16ca5cb103
1 changed files with 5 additions and 1 deletions

View File

@ -1276,7 +1276,11 @@ bool JsonTemplate(const char* dataBuf)
if (strlen(dataBuf) < 9) { return false; } // Workaround exception if empty JSON like {} - Needs checks if (strlen(dataBuf) < 9) { return false; } // Workaround exception if empty JSON like {} - Needs checks
StaticJsonBuffer<600> jb; // 331 from https://arduinojson.org/v5/assistant/ #ifdef ESP8266
StaticJsonBuffer<400> jb; // 331 from https://arduinojson.org/v5/assistant/
#else
StaticJsonBuffer<800> jb; // 654 from https://arduinojson.org/v5/assistant/
#endif
JsonObject& obj = jb.parseObject(dataBuf); JsonObject& obj = jb.parseObject(dataBuf);
if (!obj.success()) { return false; } if (!obj.success()) { return false; }