From d2529835be92c7be6a970ceda95285323fd57285 Mon Sep 17 00:00:00 2001 From: John Resig Date: Thu, 31 Aug 2006 06:32:27 +0000 Subject: [PATCH] Added native support for JSON data. --- src/ajax/ajax.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 2864c2092..7bd392aa2 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -274,6 +274,9 @@ jQuery.extend({ // If the type is "script", eval it if ( type == "script" ) eval.call( window, data ); + // Get the JavaScript object, if JSON is used. + if ( type == "json" ) eval( "data = " + data ); + return data; }, -- 2.39.5