Skip to content

Glossary: Go Beyond the Basics

json.NewEncoder / json.NewDecoder

Also written: Encoder, Decoder, Encode, Decode

An encoder writes JSON to an `io.Writer`, and a decoder reads JSON from an `io.Reader`. They are how handlers send and receive JSON.

Where the book teaches it

Related terms

io.Writerio.ReaderDisallowUnknownFields