aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-11-04 23:36:15 -0500
committerRichard Gibson <richard.gibson@gmail.com>2013-11-12 00:13:08 -0500
commit71b2ac524e49c0d1cc4e5d7bd8fd9d5a1317a20b (patch)
treed2f8a47f86968e84efdbe3b88fcbcf61a8c516f4 /src/ajax
parente8e53a6bb579938e0280724b7e84260589918cf2 (diff)
downloadjquery-71b2ac524e49c0d1cc4e5d7bd8fd9d5a1317a20b.tar.gz
jquery-71b2ac524e49c0d1cc4e5d7bd8fd9d5a1317a20b.zip
Fix #14492: More correct jQuery.parseJSON. Close gh-1419.
(cherry picked from commit 60a6178131afec97b68c9a45bc24459f7b8bd905) Conflicts: src/ajax/parseJSON.js
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/parseJSON.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ajax/parseJSON.js b/src/ajax/parseJSON.js
index e8c449bca..3a96d15b9 100644
--- a/src/ajax/parseJSON.js
+++ b/src/ajax/parseJSON.js
@@ -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;