Commit d2529835 authored by John Resig's avatar John Resig

Added native support for JSON data.

parent fb534aea
...@@ -274,6 +274,9 @@ jQuery.extend({ ...@@ -274,6 +274,9 @@ jQuery.extend({
// If the type is "script", eval it // If the type is "script", eval it
if ( type == "script" ) eval.call( window, data ); 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;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment