Search across all documentation pages
10 pages in this section.
Learn how to serialize Go structs to JSON and other formats using standard library encoders. Understand custom marshaling, struct tags, and schema evolution.
Learn Go serialization basics with 10 examples. Understand json.Marshal, json.Unmarshal, and struct tags for JSON encoding and decoding.
Implement json.Marshaler and json.Unmarshaler interfaces to control JSON serialization for Go types, including dates, enums, and redacted views.
Learn when to use Go's encoding/xml and encoding/gob packages for serialization, including examples for XML marshalling and gob encoding.
Learn how to use Go struct tags for JSON serialization, database mapping, and input validation to streamline data handling in your applications.
Validate Go structs with go-playground/validator. Define validation rules using struct tags and implement custom validators for business logic.
Learn best practices for Go serialization, including JSON tag conventions, handling optional fields, and securing decoders against large payloads.
A single-page roundup of every highlight bullet from the 9 pages in the Serialization section, grouped by source page so you can scan all 53 takeaways without opening each article individually.