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

Method AddIntKeyOmitEmpty

encode_number_int.go:106–108  ·  view source on GitHub ↗

AddIntKeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.

(key string, v int)

Source from the content-addressed store, hash-verified

104// AddIntKeyOmitEmpty adds an int to be encoded and skips it if its value is 0.
105// Must be used inside an object as it will encode a key.
106func (enc *Encoder) AddIntKeyOmitEmpty(key string, v int) {
107 enc.IntKeyOmitEmpty(key, v)
108}
109
110// AddIntKeyNullEmpty adds an int to be encoded and skips it if its value is 0.
111// Must be used inside an object as it will encode a key.

Callers 2

MarshalJSONObjectMethod · 0.80

Calls 1

IntKeyOmitEmptyMethod · 0.95

Tested by 1

MarshalJSONObjectMethod · 0.64