encoding/json package
Canonical docs for JSON marshaling, decoding, token streams, tags, and decoder behavior.
Canonical docs for JSON marshaling, decoding, token streams, tags, and decoder behavior.
- Author: Go Team
- Authority: primary
- Kind: package-doc
- URL: https://pkg.go.dev/encoding/json
What it covers
- marshal and unmarshal semantics
- decoder and encoder APIs
- field tags and decoding behavior
Why authoritative
Official package documentation for Go’s JSON APIs.
Use when
- how does encoding/json behave here
- is this Go JSON decoding correct
- what JSON tag or decoder API should I use
Keywords
- encoding/json, json, decoder, marshal, unmarshal