Closed apanasara closed 5 years ago
I read documentation of v6 in which I found that ESP8266 is not in list of supported hardware
So I will degrade library from v6 to back in v5 (v5 tested & supporting to ESP8266)
Hi @apanasara,
ArduinoJson v6 supports ESP8266, and the program above runs as expected on my Adafruit Huzzah.
Please double check.
Best Regards, Benoit
Nested arrays used
Compilation message nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino) CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module) HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash) Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Screenshot
Error-Observation
I tried following mechanism to deserialize & found following solution. (don't know exact reason, you can share if know)
Code Block
int Response(char *topic, const char *msg_buf)
{
Serial.print("in Response Block : ");
Serial.println(msg_buf);
StaticJsonDocument<2048> req;
DeserializationError err = deserializeJson(req, msg_buf, DeserializationOption::NestingLimit(4));
/*------following re-deserilization worked for me------*/
err = deserializeJson(req, req.as<const char*>(), DeserializationOption::NestingLimit(4));
Output
Hi @apanasara,
I'm gald you found a solution. This article may be relevant: Why is the input modified?
Best Regards, Benoit
I am using NodeMCU 1.0 & 0.9 with PlatformIO.
After migrating to ArduinoJson v6.11.0, I am facing problem for parsing nesting Arrays.
Code on Arduino WandBox
Code on Arduino PlatfiormIO NodeMCU