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.
Glossary: Go Beyond the Basics
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.