I have web api 2.0 controller method, which returns my objct as json:
return this.Ok(myObject);
Everything works perfect. But there is one problem. One property on myObject is date:
public DateTime Dt { get; set; }
And if I inspect Dt property in debugger(before return ok), there is correct 430 milliseconds. But json returned from server has date in format:
2016-06-02T11:56:38.43
the last zero number is missing. It should be:
2016-06-02T11:56:38.430
In case there is something different than zero, then json has all 3 miliseconds, like:
2016-06-02T11:56:38.435
So, why web api removes last number if it is 0 when creating json and how to correct that?