Im building a JObject myself and want to return it as ActionResult. I dont want to create and then serialize a data object
For example
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); //???????
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…