我自己建立一個JObject並且想把它作爲ActionResult返回。我不想創建並序列化數據對象Json.Net和ActionResult
例如
public ActionResult Test(string id)
{
var res = new JObject();
JArray array = new JArray();
array.Add("Manual text");
array.Add(new DateTime(2000, 5, 23));
res["id"] = 1;
res["result"] = array;
return Json(res); //???????
}
@李安這個問題來了,所以它是如何重複?你標記了錯誤的問題。 – Lankymart