我需要这种格式的 JSON 日期格式:docDate":"1360905419116"、","inDocDate":"1360905419116" 等。
我的序列化:
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"}