Im trying to send DateTime object from a WCF service which returns JSON objects. All dates works fine except 0001-01-01. The service fails to serialize this, why is that so?
These work fine:
return DateTime.now;
return new DateTime(1,1,2);
but these do not work:
return new DateTime();
return new DateTime(0);
return new DateTime(1,1,1);
My interface
[OperationContract]
[WebInvoke(Method = "GET",
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "/GetTest")]
DateTime GetTest();
Nothing crashes, except that no data is returned from the service. Why is that so?