omitzero vs omitempty

Go 1.24 introduced omitzero as a better alternative to omitempty for JSON marshaling. This guide explains the key differences with practical examples and helps you choose the right tag for your codebase.

January 16, 2026 · 3 min · 607 words · Leo Claudio

Encoding Go structs to JSON

A quick and practical guide to Go’s JSON encoding

January 11, 2026 · 4 min · 788 words · Leo Claudio