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

Method DecodeInterface

decode_interface.go:10–16  ·  view source on GitHub ↗

DecodeInterface reads the next JSON-encoded value from the decoder's input (io.Reader) and stores it in the value pointed to by i. i must be an interface poiter

(i *interface{})

Source from the content-addressed store, hash-verified

8//
9// i must be an interface poiter
10func (dec *Decoder) DecodeInterface(i *interface{}) error {
11 if dec.isPooled == 1 {
12 panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
13 }
14 err := dec.decodeInterface(i)
15 return err
16}
17
18func (dec *Decoder) decodeInterface(i *interface{}) error {
19 start, end, err := dec.getObject()

Callers 4

TestDecodeInterfaceBasicFunction · 0.80
TestDecodeNullFunction · 0.80

Calls 2

decodeInterfaceMethod · 0.95

Tested by 4

TestDecodeInterfaceBasicFunction · 0.64
TestDecodeNullFunction · 0.64