The old implementation of JSON.stringify() turns an array into a string, so that if you call JSON.parse() on the JSON expecting to get an array, you actually get a string back.
JSON.parse(JSON.stringify(['hi']));
// "['hi']", a String, not an Array
I thought posting this issue here would help other developers that might run into the same issue.
The old implementation of
JSON.stringify()
turns an array into a string, so that if you callJSON.parse()
on the JSON expecting to get an array, you actually get a string back.I thought posting this issue here would help other developers that might run into the same issue.
This bug was fixed in Prototype 1.7.0 (http://prototypejs.org/download).
JSFiddle Demo: https://jsfiddle.net/vexagpgf/1/