您的位置:首页 > 编程语言 > ASP

asp.net core webapi 日期返回中出现字母T

2017-09-07 18:26 786 查看
全局配置

在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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: