asp.net core 3.0 json日期格式化的问题:
.net core 2.1中,在Startup.cs 的 ConfigureServices(IServiceCollection services) 里这样写,就可以:
services.AddMvc()
.AddJsonOptions(options => { options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; });
但是,在.net core 3.0中这样写报错。
asp.net core 3.0 怎么自定义json日期格式?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2557/viewspace-3165896/ ,如需转载,请注明出处,否则将追究法律责任。