From 16ca5cb10364e7b9f987f7f2f02b3971f083c3c6 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 13 Apr 2020 13:01:54 +0200 Subject: [PATCH] Increase ESP32 compatibility --- tasmota/support.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasmota/support.ino b/tasmota/support.ino index 9ac48c3fc..bb4432d2d 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1276,7 +1276,11 @@ bool JsonTemplate(const char* dataBuf) 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); if (!obj.success()) { return false; }