I used Gson to convert java list to JSON and returned as a response to the AJAX call.
I’m getting the following data as the json object to success method variable data.
[{Id:121,RefId:123,Date:Sep 22, 2012 12:00:00 AM}]
while parsing it is giving the following error message,
JSON.parse: expected property name or ‘}’ In Firebug.
I used this code to return json object.
Gson gson = new Gson();
String json = gson.toJson(list);
where is the problem of Jquery not able to handle this ?
Any reply is highly appreciatable..
That seems to be invalid JSON, it’s missing all the quotes around the strings.
It should be something like this: