skolodyazhnyy / json-stream

JSON stream reader, writer and parser
MIT License
63 stars 10 forks source link

Unexpected object ending #13

Closed hotrush closed 3 years ago

hotrush commented 6 years ago
{"items":[{"id":123,"key":"any string\\"}],"total":1}
$this->fp_read = fopen($this->source, 'r');
$this->reader = new \Bcn\Component\Json\Reader($this->fp_read);
$this->reader->enter(\Bcn\Component\Json\Reader::TYPE_OBJECT);
$this->reader->enter('items', \Bcn\Component\Json\Reader::TYPE_ARRAY);
while ($data = $this->reader->read()) {}
Bcn\Component\Json\Exception\ReadingError [ 0 ]: Unexpected object ending ~ .../json-stream/Bcn/Component/Json/Reader.php [ 131 ]

But escaped backslash should be a valid symbol for json?

drasill commented 6 years ago

This is fixed (https://github.com/skolodyazhnyy/json-stream/pull/6).

But the project hasn't been released since a long time ago, we have to user 'dev-master' in composer.

Would it be possible to push a release please ?

skolodyazhnyy commented 6 years ago

Sure, i will create a tag

drasill commented 6 years ago

Thank you !

hotrush commented 5 years ago

@drasill i still can reproduce this issue with latest package version, are you?

drasill commented 5 years ago

I can't check right now, as I'm working on something else entirely.

But I'm pretty sure it was resolved.