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

Method DecodeObject

decode_object.go:13–19  ·  view source on GitHub ↗

DecodeObject 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 UnmarshalerJSONObject. See the documentation for Unmarshal for details about the conversion of JSON into a Go value.

(j UnmarshalerJSONObject)

Source from the content-addressed store, hash-verified

11//
12// See the documentation for Unmarshal for details about the conversion of JSON into a Go value.
13func (dec *Decoder) DecodeObject(j UnmarshalerJSONObject) error {
14 if dec.isPooled == 1 {
15 panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
16 }
17 _, err := dec.decodeObject(j)
18 return err
19}
20func (dec *Decoder) decodeObject(j UnmarshalerJSONObject) (int, error) {
21 keys := j.NKeys()
22 for ; dec.cursor < dec.length || dec.read(); dec.cursor++ {

Calls 2

decodeObjectMethod · 0.95