当前位置: 移动技术网 > IT编程>开发语言>c# > C# JsonConvert 序列号 DateTime类型 格式多T

C# JsonConvert 序列号 DateTime类型 格式多T

2019年09月11日  | 移动技术网IT编程  | 我要评论

序列化字符串后,值变成了"2018-02-05t00:00:00"

序列化时候 需要更改一下日期转换方式:

isodatetimeconverter timeconverter = new isodatetimeconverter { datetimeformat = "yyyy-mm-dd hh:mm:ss" };

public string xxxinfo => jsonconvert.serializeobject(xxx, formatting.indented, timeconverter);

原文链接:https://blog.csdn.net/q646926099/article/details/79259428

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网