1
0
mirror of https://github.com/fluencelabs/assemblyscript-json synced 2025-05-07 20:52:16 +00:00

Fix nesting array parsing

This commit is contained in:
Vladimir Grichina 2019-01-08 23:46:11 -08:00
parent f736f48359
commit bf4fffab1c

@ -165,8 +165,9 @@ export class JSONDecoder<JSONHandlerT extends JSONHandler> {
if (this.peekChar() != "[".charCodeAt(0)) { if (this.peekChar() != "[".charCodeAt(0)) {
return false; return false;
} }
if (this.handler.pushArray(this.state.lastKey)) { let key = this.state.lastKey;
this.state.lastKey = null; this.state.lastKey = null;
if (this.handler.pushArray(key)) {
this.readChar(); this.readChar();
this.skipWhitespace(); this.skipWhitespace();