Playing around with AJAX and returning data via JSON, I was always getting the error handler called in my AJAX call, despite getting data back from the server.
I noticed that my server code, which I'd quickly stolen from another blog, returned the JSON like this:
oBuilder.Append("{");
oBuilder.AppendFormat("'{0}' : {1}", "Minute", "500");
oBuilder.Append("}");so this would return
{ 'minute' : 500 }
All good right?
Wrong. Jquery 1.4 now will parse valid JSON only, and that means the single quotes inside that JSON packet HAVE to be double quotes.