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

Method AddStringOmitEmpty

encode_string.go:40–42  ·  view source on GitHub ↗

AddStringOmitEmpty adds a string to be encoded or skips it if it is zero value. Must be used inside a slice or array encoding (does not encode a key)

(v string)

Source from the content-addressed store, hash-verified

38// AddStringOmitEmpty adds a string to be encoded or skips it if it is zero value.
39// Must be used inside a slice or array encoding (does not encode a key)
40func (enc *Encoder) AddStringOmitEmpty(v string) {
41 enc.StringOmitEmpty(v)
42}
43
44// AddStringNullEmpty adds a string to be encoded or skips it if it is zero value.
45// Must be used inside a slice or array encoding (does not encode a key)

Callers 1

MarshalJSONArrayMethod · 0.80

Calls 1

StringOmitEmptyMethod · 0.95

Tested by 1

MarshalJSONArrayMethod · 0.64