MarshalJSON implements the [json.Marshaler] interface.
()
| 107 | |
| 108 | // MarshalJSON implements the [json.Marshaler] interface. |
| 109 | func (d DateTime) MarshalJSON() ([]byte, error) { |
| 110 | return []byte(`"` + d.String() + `"`), nil |
| 111 | } |
| 112 | |
| 113 | // UnmarshalJSON implements the [json.Unmarshaler] interface. |
| 114 | func (d *DateTime) UnmarshalJSON(b []byte) error { |