Is there something builtin (JsConfig?) to enforce that any DateTime in any DTO that has a value of DateTime.MinValue is not serialized? rather than serilizing it to 0001-01-01T00:00:00.0000000Z ?
We already use this:
JsConfig.DateHandler = DateHandler.ISO8601;
can we extend this somehow, without losing what it already does?
OK, I am worried about applying JsConfig.ExcludeDefaultValues = true;
It solves my issues with DateTime but may introduce issues with integers/longs/doubles etc. since they wont even appear in the JSON. Which may or may not break existing JS clients that do no type checking on these values. They just display them.
Is another option to simply take over the serialization/deserialization of DateTime?
If so, how to reproduce what JsConfig.DateHandler = DateHandler.ISO8601; and JsConfig.AssumeUtc = true does BUT NOT serialize DateTime.MinValue?