RyanMarcus / dirty-json

A parser for invalid JSON

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsing JSON fails on multidimensional array property

tphamZerion opened this issue · comments

When the server tried to parse an object contain a multidimensional array property, dirty-json sent out this message:

dirty-json got valid JSON that failed with the custom parser. We're returning the valid JSON, but please file a bug report here: https://github.com/RyanMarcus/dirty-json/issues

Here is my data:
{ "rows": [["this", "is", "failing"]] }

However, the parser works fine when the data has another array inside "rows" array.
Here is an example:
{ "rows": [["it", "works", "fine"], ["now"]] }

Let me know if you need more information about the issue

Thank you :)

Confirmed this. Thanks for the report. I'll try to fix it soon.

Think I have a fix. Turns out it was a pretty simple bug.

Thank you

Fixed in 0.4.0. On NPM now.