我有一個字符串,下面我試圖轉換成一個JSON對象,並使用語法var json = JSON.parse(myjson);
,但它是說預期的令牌}但我看不到在哪裏?{name:「Name」,value:1}無效JSON?
有誰知道這會是哪裏?
[{name:"After", value:1},{name:"watching", value:1},{name:"you", value:1},{name:"at", value:3},{name:"Birmngm", value:1},{name:"my", value:1},{name:"new", value:2},{name:"athlete", value:1},{name:"to", value:1},{name:"follow.", value:1},{name:"Love", value:2},{name:"the", value:4},{name:"passion,", value:1},{name:"enthusiasm", value:1},{name:"and", value:3},{name:"big", value:1},{name:"smiles!!", value:1},{name:"Long", value:1},{name:"may", value:1}]
這是一個很好的工具:http://jsonlint.com/ – 2013-02-27 21:00:31
不,它不是。屬性名稱缺少字符串分隔符。 – Bergi 2013-02-27 21:01:09
請給我們的代碼。你誤以爲JSON的簡單對象文字? – Bergi 2013-02-27 21:02:16