I am using Newtonsoft's Json
when i serialze a date time property i get the json response as:
..."CreatedOn":"/Date(1317303882420+0500)/",...
i want it to be in simple string as
..."createdOn": "2011-05-05 14:03:07", ...
while my class property is DateTime, how can i force to serialze it as string, as we can add attribute to change the property name as
[JsonProperty("id")]
public int ProductID { get; set; }
is there a similar way to force a DateTime property to serialize to string??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…