Hi,
We are using jQuery 1.6.4 in our application and requested to upgrade to 1.9.0.
So I have upgraded to 1.9.0 along with jQuery migrate plugin to capture the errors and warnings.
I have fixed some issues which were occured due to the upgradation.
Now I am facing the below issues in json parse while navigating to a particular page.
syntax error: jquery-1.9.0.js which is pointing to the second line of below code (ie. return line)
if ( window.JSON && window.JSON.parse ) {
return
window.JSON.parse( data );
}
Also I found the below through google search:
Prior to 1.9, an ajax call that expected a return data type of JSON or JSONP would consider a return value of an empty string to be a success case, but return a null to the success handler or promise. As of 1.9, an empty string returned for JSON data is considered to be malformed JSON (because it is); this will now throw an error. Use the error handler to catch such cases.
I am very new to jQuery and not sure how to catch the error in this specific scenario.
Could you please help me on this to resolve?
Thanks,
Praveen DK