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

Method DecodeArray

decode_array.go:11–17  ·  view source on GitHub ↗

DecodeArray reads the next JSON-encoded value from the decoder's input (io.Reader) and stores it in the value pointed to by v. v must implement UnmarshalerJSONArray. See the documentation for Unmarshal for details about the conversion of JSON into a Go value.

(v UnmarshalerJSONArray)

Source from the content-addressed store, hash-verified

9//
10// See the documentation for Unmarshal for details about the conversion of JSON into a Go value.
11func (dec *Decoder) DecodeArray(v UnmarshalerJSONArray) error {
12 if dec.isPooled == 1 {
13 panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
14 }
15 _, err := dec.decodeArray(v)
16 return err
17}
18func (dec *Decoder) decodeArray(arr UnmarshalerJSONArray) (int, error) {
19 // remember last array index in case of nested arrays
20 lastArrayIndex := dec.arrayIndex

Calls 2

decodeArrayMethod · 0.95