安装 Microsoft.AspNetCore.Mvc.Newtonsoft 包 在startup.cs中添加 pub
安置 Microsoft.AspNetCore.Mvc.Newtonsoft 包
在startup.cs中添加
public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.AddMvcCore().AddNewtonsoftJson(options => { options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; }); RegisterMyServices(services); }
netcore 3.1 This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 32.
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/30269.html