ASP.NET MVC Controller.Json DateTime Serialization vs NewtonSoft Json DateTime Serialization

后端 未结 4 1683
离开以前
离开以前 2020-12-18 01:42

When I return object that contains DateTime property using

return Json(value);

on client I receive

\"/Date(1336618438854)/         


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-18 02:18

    If you dont want to dig in to the Parsing thing than simply convert your date in to the string than parse it with the JSON.

    for example

    return Json(DateTime.Now.ToString("your date format if you want to specify"));
    

提交回复
热议问题