After the JavaScriptSerializer serialization time, the time will be serialized into nhexadecimal ghost data. The following is an example, A friend who needs to know about the time serialized by JavaScriptSerializer will serialize the time into the native ghost data, so he checked the material and sat down the record.
Suppose list = News List <Text> () {New Text () {id = 1, date = '2017-03-11 00:00:00. 000 '}}
</Text>
JavaScriptSerializer serializable = new JavaScriptSerializer (); string json = serializable. serialize (new {total = total, rows = list}); // use a regular expression to replace the serialized time json = System. text. regularExpressions. regex. replace (json, @ "\/Date \ (\ d +) \/", match => {DateTime dt = new DateTime (1970, 1, 1); dt = dt. addMilliseconds (long. parse (match. groups [1]. value); dt = dt. toLocalTime (); return dt. toString ("yyyy-MM-dd HH: mm: ss") ;}); return json;