jQuery parsererror and WCF Data Services

If you’re using WCF Data Services (REST APIs for SharePoint, for example) and you’re getting the mysterious “parsererror” error message from jQuery, chances are you’ll need to modify your scripts according to this bug report.

The root of the error is the occurrence of single quotes within your JSON response.  This can be fixed by adding the following snippet of code before you make your AJAX calls:

Oddly, this error seemingly came out of nowhere for me; script was working fine one day and broken the next…

Luckily, the patch in this ticket seems to have fixed it for me.

You may also like...