返回json对象的fron函数

我试图从函数返回一个json对象,并将其用作下面的代码,但它不起作用。 怎么了?

var x = [ "EditFileName" , "dosometing" ]; c_loadAjax.apply(this,x).done(function(json){ alert(json.error); }); function c_loadAjax( post , option ){ $.ajax({ type:"POST", url:"/includes/Ajax.php", data:{post:post,option:option}, error:function(result){ return '{"error":"Error"}'; }, success:function(result){ return jQuery.parseJSON(result); } }); } 

尝试使用return关键字

 var x = [ "EditFileName" , "dosometing" ]; c_loadAjax.apply(this,x).done(function(json){ alert(json.error); }); function c_loadAjax( post , option ){ return $.ajax({ type:"POST", url:"/includes/Ajax.php", data:{post:post,option:option}, error:function(result){ return '{"error":"Error"}'; }, success:function(result){ return jQuery.parseJSON(result); } }); }