MCPcopy Create free account
hub / github.com/francoispqt/gojay / MarshalJSONObject

Method MarshalJSONObject

gojay/codegen/test/basic_struct/encoding.go:102–109  ·  view source on GitHub ↗

MarshalJSONObject implements MarshalerJSONObject

(enc *gojay.Encoder)

Source from the content-addressed store, hash-verified

100
101// MarshalJSONObject implements MarshalerJSONObject
102func (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
112func (m *SubMessage) IsNil() bool {

Callers

nothing calls this directly

Calls 3

IntKeyMethod · 0.80
StringKeyMethod · 0.80
TimeKeyMethod · 0.80

Tested by

no test coverage detected