处理json时间格式

代码
IsoDateTimeConverter iso = new IsoDateTimeConverter(); 

iso.DateTimeFormat = "yyyy-MM-dd";//设置事件的格式

Console.WriteLine(JsonConvert.SerializeObject(product, iso));
输出
{"Name":"android","Expiry":"2000-09-09","Price":2000.0,"Sizes":["1.5","2.2","4.1
"]}
{"Name":"android","Expiry":"2000-09-09","Price":2000.0,"Sizes":["1.5","2.2","4.1
"]}

 
  
 
  

原文地址 http://www.cnblogs.com/ac1985482/archive/2012/07/12/2587957.html

 

你可能感兴趣的:(json,时间格式)