git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb534ae
)
Added native support for JSON data.
author
John Resig
<jeresig@gmail.com>
Thu, 31 Aug 2006 06:32:27 +0000
(06:32 +0000)
committer
John Resig
<jeresig@gmail.com>
Thu, 31 Aug 2006 06:32:27 +0000
(06:32 +0000)
src/ajax/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax/ajax.js
b/src/ajax/ajax.js
index
2864c20
..
7bd392a
100644
(file)
--- 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 );
// 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;
},
return data;
},