NuGet安装转json包
using Newtonsoft.Json; using Newtonsoft.Json.Converters; IsoDateTimeConverter timeFormat = new IsoDateTimeConverter(); var b = JsonConvert.SerializeObject( 实体类构造的对象 , Newtonsoft.Json.Formatting.Indented, timeFormat);
NuGet安装转json包
using Newtonsoft.Json; using Newtonsoft.Json.Converters; IsoDateTimeConverter timeFormat = new IsoDateTimeConverter(); var b = JsonConvert.SerializeObject( 实体类构造的对象 , Newtonsoft.Json.Formatting.Indented, timeFormat);