其实我的问题很简单。我认为。但不幸的是,谷歌这次帮不了我了。 我想在我的 View 中以这种格式返回 JSON:
[[0,"Mark Kordon",null,"My HTML - Mark Kordon"],[1,"John Doe",null,"John Doe Markup"]]
这怎么可能?
最佳答案
听起来您想要做的就是从 Controller 返回模型作为 JsonResult:
public ActionResult Index()
{
return Json(yourModel);
}
关于jquery - ASP.NET MVC 中的 JSON 返回格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1314043/