MCPcopy Index your code
hub / github.com/segmentio/encoding / Decode

Method Decode

json/json.go:376–383  ·  view source on GitHub ↗

Decode is documented at https://golang.org/pkg/encoding/json/#Decoder.Decode

(v any)

Source from the content-addressed store, hash-verified

374
375// Decode is documented at https://golang.org/pkg/encoding/json/#Decoder.Decode
376func (dec *Decoder) Decode(v any) error {
377 raw, err := dec.readValue()
378 if err != nil {
379 return err
380 }
381 _, err = Parse(raw, v, dec.flags)
382 return err
383}
384
385const (
386 minBufferSize = 32768

Callers 15

BenchmarkCodeDecoderFunction · 0.95
BenchmarkUnicodeDecoderFunction · 0.95
BenchmarkDecoderStreamFunction · 0.95
ExampleDecoderFunction · 0.95
TestUnmarshalFunction · 0.95
TestEmptyStringFunction · 0.95
TestCodecFunction · 0.95
TestCodecDurationFunction · 0.95
TestDecodeLinesFunction · 0.95
TestDecoderInputOffsetFunction · 0.95
TestGithubIssue18Function · 0.95

Calls 2

readValueMethod · 0.95
ParseFunction · 0.70

Tested by 15

BenchmarkCodeDecoderFunction · 0.76
BenchmarkUnicodeDecoderFunction · 0.76
BenchmarkDecoderStreamFunction · 0.76
ExampleDecoderFunction · 0.76
TestUnmarshalFunction · 0.76
TestEmptyStringFunction · 0.76
TestCodecFunction · 0.76
TestCodecDurationFunction · 0.76
TestDecodeLinesFunction · 0.76
TestDecoderInputOffsetFunction · 0.76
TestGithubIssue18Function · 0.76