Fix #14492: More correct jQuery.parseJSON. Close gh-1419.

(cherry picked from commit 60a6178131)

Conflicts:

	src/ajax/parseJSON.js
This commit is contained in:
Richard Gibson
2013-11-04 23:36:15 -05:00
parent e8e53a6bb5
commit 71b2ac524e
3 changed files with 76 additions and 8 deletions

View File

@@ -2,7 +2,11 @@ define([
"../core"
], function( jQuery ) {
jQuery.parseJSON = JSON.parse;
// Support: Android 2.3
// Workaround failure to string-cast null input
jQuery.parseJSON = function( data ) {
return JSON.parse( data + "" );
};
return jQuery.parseJSON;