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)
| 11 | // |
| 12 | // See the documentation for Unmarshal for details about the conversion of JSON into a Go value. |
| 13 | func (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 | } |
| 20 | func (dec *Decoder) decodeObject(j UnmarshalerJSONObject) (int, error) { |
| 21 | keys := j.NKeys() |
| 22 | for ; dec.cursor < dec.length || dec.read(); dec.cursor++ { |