Parsing String values crashes ESP8266
Created by: JeffAshton
Also noticing on the ESP8266, that parsing anything but a statically defined const char*, kills the parser.
#include <ArduinoJson.h>
void setup() {
Serial.begin( 115200 );
delay( 10 );
Serial.println( "" );
StaticJsonBuffer<200> jsonBuffer;
String json = "{\"mqtt.host\":\"mqtt.test.com\",\"mqtt.port\":1883}";
Serial.println( "Parsing json string" );
JsonObject& root = jsonBuffer.parseObject( json );
if( root.success() ) {
Serial.println( "parsed" );
} else {
Serial.println( "failed" );
}
}
void loop() {
}
Results in
Parsing json string
Exception (9):
epc1=0x402021cd epc2=0x00000000 epc3=0x00000000 excvaddr=0x3ffe9d67 depc=0x00000000
ctx: cont
sp: 3ffe9b40 end: 3ffe9e30 offset: 01a0
>>>stack>>>
3ffe9ce0: 3fffdc20 00000013 3ffe8de4 402039a9
3ffe9cf0: 3ffe8968 00000000 3ffe8de4 3ffe9e5c
3ffe9d00: 3fffdc20 00000000 3ffe8de4 40202216
3ffe9d10: 3ffe9d30 3ffe9d34 3ffe9d34 4020450a
3ffe9d20: 3fffdc20 00000000 3ffe8de4 4020214e
3ffe9d30: 3ffe8878 716d227b 682e7474 2274736f
3ffe9d40: 716d223a 742e7474 2e747365 226d6f63
3ffe9d50: 716d222c 702e7474 2274726f 3838313a
3ffe9d60: 00007d33 00000000 00000000 00000000
3ffe9d70: 00000000 00000000 00000000 00000000
3ffe9d80: 00000000 00000000 00000000 00000000
3ffe9d90: 00000000 00000000 00000000 00000000
3ffe9da0: 00000000 00000000 00000000 00000000
3ffe9db0: 00000000 00000000 00000000 00000000
3ffe9dc0: 00000000 00000000 00000000 00000000
3ffe9dd0: 00000000 00000000 00000000 00000000
3ffe9de0: 00000000 00000000 00000000 00000000
3ffe9df0: 00000000 00000000 00000000 00000037
3ffe9e00: 3fff38a8 0000002e 0000002e 00000000
3ffe9e10: 00000000 00000000 3ffe9e54 40201a07
3ffe9e20: 00000000 00000000 3ffe8e10 40100378
<<<stack<<<