Newtonsoft.Json日期格式定义,参考代码如下:
IsoDateTimeConverter timeConverter = new IsoDateTimeConverter();
timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
Newtonsoft.Json.JsonConvert.SerializeObject(Object, timeConverter);
Newtonsoft.Json日期格式定义,参考代码如下:
IsoDateTimeConverter timeConverter = new IsoDateTimeConverter();
timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
Newtonsoft.Json.JsonConvert.SerializeObject(Object, timeConverter);