The documentation seems to say that JSON.parse should only work on strings:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
However, it appears that it works on 1-length array integer values:
-> JSON.parse([123])
<- 123
-> JSON.parse(["[123]"])
<- [123]
However, if there's more than one value, it breaks:
-> JSON.parse([123, 456])
<- VM439:1 Uncaught SyntaxError: Unexpected token , in JSON at position 3
at JSON.parse (<anonymous>)
at <anonymous>:1:6
Or a single string value:
-> JSON.parse(['string'])
<- VM586:1 Uncaught SyntaxError: Unexpected token s in JSON at position 0
at JSON.parse (<anonymous>)
at <anonymous>:1:6
Does anyone know why it behaves this way?