Open zserge opened 8 years ago
Parsing such array as 3 elements is definitely incorrect, in browser as well:
JSON.parse('[1,,3]')
SyntaxError: JSON.parse: unexpected character at line 1 column 4 of the JSON data
The fact that it works in strict mode is a bug.
Related to #52
I found out that parsing the string "[a,,b]" produces an array with 2 elements, while a browser interprets it as a 3-element array, where the second is undefined. I don't know if you will find this useful, but i wrote a patch to parse the empty second array element as an empty string.