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

Method AddFloatKey

encode_number_float.go:77–79  ·  view source on GitHub ↗

AddFloatKey adds a float64 to be encoded, must be used inside an object as it will encode a key

(key string, v float64)

Source from the content-addressed store, hash-verified

75
76// AddFloatKey adds a float64 to be encoded, must be used inside an object as it will encode a key
77func (enc *Encoder) AddFloatKey(key string, v float64) {
78 enc.Float64Key(key, v)
79}
80
81// AddFloatKeyOmitEmpty adds a float64 to be encoded and skips it if its value is 0.
82// Must be used inside an object as it will encode a key

Callers 4

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

Calls 1

Float64KeyMethod · 0.95

Tested by 3

MarshalJSONObjectMethod · 0.64
MarshalJSONObjectMethod · 0.64
MarshalJSONObjectMethod · 0.64