Glossary: Go Beyond the Basics
DisallowUnknownFields
Also written: dec.DisallowUnknownFields
A JSON decoder setting that makes decoding fail on names the struct doesn't have, which catches typos like `line` for `lines`.
Where the book teaches it
Related terms
json.NewEncoder / json.NewDecoderJSON (JavaScript Object Notation)