问题
In classic asp.net in order to return large json data i enable it web.config
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483644"/>
</webServices>
</scripting>
</system.web.extensions>
and then also set the max length in action method
public ActionResult GetData()
{
var data = _service.GetData();
var json = Json(data);
json.MaxJsonLength = Int32.MaxValue;
return json;
}
what is equivalent in ASP.NET core? In asp.net core I don't see JsonResult
has MaxJsonLength
proeprty
来源:https://stackoverflow.com/questions/48271054/how-to-return-large-json-in-asp-net-core