62,072
社区成员
发帖
与我相关
我的任务
分享
public JsonResult test()
{
string a = "{v1:1}";
string b = "{b:10}";
return Json(a); //return Json(b); 客户端接收的都不是JSON格式,而是一个字符串,要怎么修改后台才对?
}
public ActionResult aaa()
{string a = "{\"v1\":1}";//因为你已经预先转成json格式了,所以出去不能再以JsonResult
return new ContentResult() { Content = a};
}
var a = new {V1=1};
return Json(a);