MarshalJSONObject implements MarshalerJSONObject
(enc *gojay.Encoder)
| 100 | |
| 101 | // MarshalJSONObject implements MarshalerJSONObject |
| 102 | func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) { |
| 103 | enc.IntKey("Id", m.Id) |
| 104 | enc.StringKey("Description", m.Description) |
| 105 | enc.TimeKey("StartTime", &m.StartTime, time.RFC3339) |
| 106 | if m.EndTime != nil { |
| 107 | enc.TimeKey("EndTime", m.EndTime, time.RFC3339) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | // IsNil checks if instance is nil |
| 112 | func (m *SubMessage) IsNil() bool { |