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

Method encodeArray

encode_array.go:16–22  ·  view source on GitHub ↗
(v MarshalerJSONArray)

Source from the content-addressed store, hash-verified

14 return nil
15}
16func (enc *Encoder) encodeArray(v MarshalerJSONArray) ([]byte, error) {
17 enc.grow(200)
18 enc.writeByte('[')
19 v.MarshalJSONArray(enc)
20 enc.writeByte(']')
21 return enc.buf, enc.err
22}
23
24// AddArray adds an implementation of MarshalerJSONArray to be encoded, must be used inside a slice or array encoding (does not encode a key)
25// value must implement Marshaler

Callers 2

EncodeArrayMethod · 0.95
marshalFunction · 0.80

Calls 3

growMethod · 0.95
writeByteMethod · 0.95
MarshalJSONArrayMethod · 0.65

Tested by

no test coverage detected