首页 > Web开发 > 详细

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.

时间:2020-02-09 17:45:37      阅读:349      评论:0      收藏:0      [点我收藏+]

安装  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.

原文:https://www.cnblogs.com/huanyun/p/12287403.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!