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

Method AddObjectKey

encode_object.go:82–84  ·  view source on GitHub ↗

AddObjectKey adds a struct to be encoded, must be used inside an object as it will encode a key value must implement MarshalerJSONObject

(key string, v MarshalerJSONObject)

Source from the content-addressed store, hash-verified

80// AddObjectKey adds a struct to be encoded, must be used inside an object as it will encode a key
81// value must implement MarshalerJSONObject
82func (enc *Encoder) AddObjectKey(key string, v MarshalerJSONObject) {
83 enc.ObjectKey(key, v)
84}
85
86// AddObjectKeyOmitEmpty adds an object to be encoded or skips it if IsNil returns true.
87// Must be used inside a slice or array encoding (does not encode a key)

Callers 6

AddInterfaceKeyMethod · 0.95
MarshalJSONObjectMethod · 0.80
MarshalJSONObjectMethod · 0.80
MarshalJSONObjectMethod · 0.80
MarshalJSONObjectMethod · 0.80
MarshalJSONObjectMethod · 0.80

Calls 1

ObjectKeyMethod · 0.95

Tested by 2

MarshalJSONObjectMethod · 0.64
MarshalJSONObjectMethod · 0.64