全局配置

在Startup文件中修改

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
    // Add framework services.
    services.AddMvc()
        //全局配置Json序列化处理
        .AddJsonOptions(options =>
        {
              //设置时间格式
            options.SerializerSettings.DateFormatString = "yyyy-MM-dd";
        }
        );
}

  参考链接:http://www.cnblogs.com/tianma3798/p/6918548.html

相关文章:

  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2021-05-21
  • 2021-11-22
猜你喜欢
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2021-12-10
相关资源
相似解决方案