在经典的 asp.net 中,为了返回大的 json 数据,我启用它 web.config
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483644"/>
</webServices>
</scripting>
</system.web.extensions>
然后还在操作方法中设置最大长度
public ActionResult GetData()
{
var data = _service.GetData();
var json = Json(data);
json.MaxJsonLength = Int32.MaxValue;
return json;
}
ASP.NET core 中的等效项是什么?在 asp.net core 中我没有看到JsonResult
has MaxJsonLength
财产
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)