diff --git a/JSONStream.php b/JSONStream.php index 433dd1e..089eaf5 100644 --- a/JSONStream.php +++ b/JSONStream.php @@ -47,6 +47,10 @@ class JSONStream $this->offset++; $this->skipWhitespace(); $st = $this->buffer[$this->offset] === '}' ? 2 : 1; + if ($st == 2) + { + $this->offset++; + } $this->in[] = [ $st, self::OBJ, NULL, false ]; } @@ -64,6 +68,10 @@ class JSONStream $this->offset++; $this->skipWhitespace(); $st = $this->buffer[$this->offset] === ']' ? 2 : 1; + if ($st == 2) + { + $this->offset++; + } $this->in[] = [ $st, self::ARR, NULL, false ]; }