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

Method AddBoolKeyOmitEmpty

encode_bool.go:52–54  ·  view source on GitHub ↗

AddBoolKeyOmitEmpty adds a bool to be encoded and skips if it is zero value. Must be used inside an object as it will encode a key.

(key string, v bool)

Source from the content-addressed store, hash-verified

50// AddBoolKeyOmitEmpty adds a bool to be encoded and skips if it is zero value.
51// Must be used inside an object as it will encode a key.
52func (enc *Encoder) AddBoolKeyOmitEmpty(key string, v bool) {
53 enc.BoolKeyOmitEmpty(key, v)
54}
55
56// AddBoolKeyNullEmpty adds a bool to be encoded and encodes `null` if it is zero value.
57// Must be used inside an object as it will encode a key.

Callers 2

MarshalJSONObjectMethod · 0.80

Calls 1

BoolKeyOmitEmptyMethod · 0.95

Tested by 1

MarshalJSONObjectMethod · 0.64