I have just installed ASP MVC 4 and my JSON dates are still coming back in the old format {"timestamp":"\/Date(1348070400000)\/"}
.
I was under the impression that they should be coming back in the format 2012-02-18T00:54:06.8447642Z
without me doing anything.
Note: JSON.NET is now an integral part of ASP.NET Web API so you can just us it out of the box.
My controller looks something like this
public JsonResult Test()
{
return Json(new {timestamp = DateTime.Now()}, JsonRequestBehavior.AllowGet);
}
How can I get this to work? Do I need to make a change in my Global.asax.cs or Web.config?