Go Snippet
Struct Tags for JSON Marshalling
Difficulty: Easy
Struct tags tell `encoding/json` how to map Go fields to JSON keys. This snippet covers the canonical tag forms (`json:"name"`, `json:"name,omitempty"`, `json:"-"`), embedded structs, and unmarshalling JSON back into a struct. Use these to produce idiomatic snake_case JSON from Go's PascalCase fields without writing a custom marshaller.
