decode.go
func (d Decoder) DecodeArray(f func(Decoder) error) (err error) {
	var typ Type

	if d.off != 0 {
		if d.off, err = 0, d.Parser.ParseMapValue(d.off-1); err != nil {
			return
		}
	}

	if typ, err = d.Parser.ParseType(); err != nil {
		return
	}

	err = d.decodeArrayImpl(typ, f)
	return
}
func (d Decoder) DecodeArray(f func(Decoder) error) (err error) {
	var typ Type

	if d.off != 0 {
		if d.off, err = 0, d.Parser.ParseMapValue(d.off-1); err != nil {
			return
		}
	}

	if typ, err = d.Parser.ParseType(); err != nil {
		return
	}

	err = d.decodeArrayImpl(typ, f)
	return
}
// DecodeArray provides the implementation of the algorithm for decoding arrays,
// where f is called to decode each element of the array.