2
我需要從這種格式的格式JSON日期:docDate「:」1360905419116「,」,「inDocDate」:「1360905419116」,等。如何格式化沒有/Date的JSON日期?
我的連載:
JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
string result = jsonSerializer.Serialize(new {
docDate = DateTime.Now,
inDocDate = DateTime.Now,
outDocDate = DateTime.Now });
結果我序列化後得到:
{"docDate":"\/Date(1360905419116)\/","inDocDate":"\/Date(1360905419116)\/","outDocDate":"\/Date(1360905419116)\/"}
我想有
{"docDate":"1360905419116","inDocDate":"1360905419116","outDocDate":"1360905419116"}