Allow serialization of `DateTimeOffset`
JamieMagee opened this issue · 0 comments
JamieMagee commented
Describe the feature
We have custom DateTimeOffset
converters for nullable and non-nullable types. These are required because GitHub webhooks can contain timestamps in ISO8601 or UNIX milliseconds formats, so the built-in JSON converters aren't suitable.
Currently we have only implemented the deserialization part, and the serializers throw a NotImplementedException
.
We avoided writing the serializers because we can't be sure exactly what the original object's format was. I think throwing an exception is more painful than getting the wrong format, and we should just pick either ISO8601 or UNIX milliseconds and stick with it.
See #22 for more information.