一、使用自带的
JsonSerializerSettings settings = new JsonSerializerSettings(); settings.Converters.Add(new IsoDateTimeConverter { DateTimeFormat = "yyyy'/'MM'/'dd" });View Code
二、自定义
public class DateTimeFormatConverter : IsoDateTimeConverter { public DateTimeFormatConverter(string format) { DateTimeFormat = format; } }View Code
标签:Newtonsoft,JsonSerializerSettings,处理,format,Json,new,public,View From: https://www.cnblogs.com/5tomorrow/p/16745189.html