我一直得到一個JSON解析器錯誤以下數據:JSON解析器錯誤
[{"data":"Aerospace and Defense"},{"data":"Agriculture"},{"data":"Business Services"},{"data":"Chemicals"},{"data":"Construction"},{"data":"Consumer Goods and Services"},{"data":"Education"},{"data":"Electronics"},{"data":"Energy and Utilities"},{"data":"Environmental Services and Equipment"},{"data":"Financial Services"},{"data":"Food and Beverage"},{"data":"Healthcare Goods and Services"},{"data":"Industrial Goods and Services"},{"data":"Information Technology"},{"data":"Metals and Mining"},{"data":"Security Products and Services"},{"data":"Software"},{"data":"Telecom"},{"data":"Tranportation and Storage"}]
誰能請找出錯誤是什麼?我原本使用「航空航天&國防」,並認爲特殊性質可能是問題。但它看起來不像。
我使用ASP.NET MVC JSONResult將它傳回給jQuery。 FireFox和IE顯示正確創建的數據,但jquery解析器拋出錯誤。我聽說在新的jQuery中解析器已經有了很大的修改。
任何幫助將不勝感激。
是誤差'無效JSON'?或者是其他東西?什麼版本的jQuery?你在調用'$ .parseJSON'嗎?你能展示一些代碼嗎? – user113716 2011-02-27 02:31:20
「新版本」是指你的意思是哪個版本?另外,你使用什麼瀏覽器? – rsp 2011-02-27 02:45:31
只是把它在那裏,jQuery的解析器不喜歡看到的NaN – diachedelic 2012-11-28 23:59:01