Time.MarshalJSON also encodes uninitialized time.Time values.
It would be better if the encoding was guarded with IsZero() to avoid returning
meaningless times.
The text was updated successfully, but these errors were encountered:
I don't know if this is even possible in the scope of the Time type, but I guess not.
Maybe another interface like MarshalJSON() would be required to implement this.
type OmitEmpty interface {
IsEmptyJSON() bool
}
The text was updated successfully, but these errors were encountered: