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

FuncType EncodeArrayFunc

encode_array.go:202–202  ·  view source on GitHub ↗

EncodeArrayFunc is a custom func type implementing MarshaleArray. Use it to cast a func(*Encoder) to Marshal an object. enc := gojay.NewEncoder(io.Writer) enc.EncodeArray(gojay.EncodeArrayFunc(func(enc *gojay.Encoder) { enc.AddStringKey("hello", "world") }))

func(*Encoder)

Source from the content-addressed store, hash-verified

200// enc.AddStringKey("hello", "world")
201// }))
202type EncodeArrayFunc func(*Encoder)
203
204// MarshalJSONArray implements MarshalerJSONArray.
205func (f EncodeArrayFunc) MarshalJSONArray(enc *Encoder) {

Callers 15

TestEncoderInt64Function · 0.85
TestEncoderInt32Function · 0.85
TestEncoderInt16Function · 0.85
TestEncoderInt8Function · 0.85
TestEncoderFloat64Function · 0.85
SliceStringMethod · 0.85
SliceStringKeyMethod · 0.85
SliceIntMethod · 0.85
SliceIntKeyMethod · 0.85
SliceFloat64Method · 0.85
SliceFloat64KeyMethod · 0.85
SliceBoolMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…