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

Method AddObjectOmitEmpty

encode_object.go:69–71  ·  view source on GitHub ↗

AddObjectOmitEmpty adds an object to be encoded or skips it if IsNil returns true. Must be used inside a slice or array encoding (does not encode a key) value must implement MarshalerJSONObject

(v MarshalerJSONObject)

Source from the content-addressed store, hash-verified

67// Must be used inside a slice or array encoding (does not encode a key)
68// value must implement MarshalerJSONObject
69func (enc *Encoder) AddObjectOmitEmpty(v MarshalerJSONObject) {
70 enc.ObjectOmitEmpty(v)
71}
72
73// AddObjectNullEmpty adds an object to be encoded or skips it if IsNil returns true.
74// Must be used inside a slice or array encoding (does not encode a key)

Callers 1

MarshalJSONArrayMethod · 0.80

Calls 1

ObjectOmitEmptyMethod · 0.95

Tested by 1

MarshalJSONArrayMethod · 0.64