MCPcopy Create free account
hub / github.com/go-chi/render / DecodeJSON

Function DecodeJSON

decoder.go:42–45  ·  view source on GitHub ↗

DecodeJSON decodes a given reader into an interface using the json decoder.

(r io.Reader, v interface{})

Source from the content-addressed store, hash-verified

40
41// DecodeJSON decodes a given reader into an interface using the json decoder.
42func DecodeJSON(r io.Reader, v interface{}) error {
43 defer io.Copy(ioutil.Discard, r) //nolint:errcheck
44 return json.NewDecoder(r).Decode(v)
45}
46
47// DecodeXML decodes a given reader into an interface using the xml decoder.
48func DecodeXML(r io.Reader, v interface{}) error {

Callers 1

DefaultDecoderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…