In the project, often the processing of a JSON data, not often also reported some errors, these errors are not careful enough to cause. Here also do a small induction, I each processing front-end page list data, like will jquery template (jquery template.js), simple and clear, only need to pass the background processing good "JSON" data, OK. But sometimes, we need to edit the list of data, and upload to the background processing, this time, we need to process the front-end data into a JSON data string, using AJAX asynchronous into the background, the reverse order of the JSON string object, and to be more into the database; And it's the same. As shown
I ran away from the problem when I had an error. In a different way to solve it. This time again error, determined to take it, calm down to look carefully. Finally found that the problem is that the front-end JSON string splicing problem, too careless, I wrote such a similar JSON data {[Name: Xiao Ming, value:25],[name: Xiao Li, value:23]} on the report similar errors. The correct wording is "[{name: Xiaoming, value:25},{name: Xiao Li, valu:23}]" is OK. Sometimes, it is such a small problem, let you engage in a big day. At the same time, encounter problems don't be afraid, not afraid of trouble! Alas, deep feelings!
Third-party plug-ins for handling JSON data at a very easy error point