I'm trying to parse a JSON string : ( with JSON.parse() )
[{"number":0}]
But it shows me the message : SyntaxError: Unexpected token { at Object.parse (native) http://img4.hostingpics.net/pics/789845screengladys.png
My JSON seems to be correct, does everyone have an ideas how to fix it ? Thank you in forward for your help :)
[
, not{
. There must be something before that character that is causing it to be invalid. – Sean Fujiwara May 8 '14 at 16:58Object.parse
, but you should be usingJSON.parse
. – Sean Fujiwara May 8 '14 at 23:18typeof(xhralarme.responseText)
andxhralarme.responseText.length
give the values you expect? – Sean Fujiwara May 9 '14 at 19:45