I keep on getting a JSON parser error for the following data:
[{"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"}]
Can anyone please identify what the error is? I was originally using "Aerospace & Defense" and thought that the special character might be the issue. But it doesn't look like it.
I use the ASP.NET MVC JSONResult to pass this back to jQuery. FireFox and IE show the data being created correctly, but the jquery parser throws an error. I have heard that the parser has been modified significantly in the new jQuery.
Any help would be highly appreciated.
Invalid JSON? Or something else? What version of jQuery? Are you calling$.parseJSON? Could you show some code?