Go 1.27 stabilizes encoding/json/v2 stricter parsing
The Go team has shipped encoding/json/v2 as stable in Go 1.27, bringing stricter parsing defaults, better error messages, and improved performance. Key changes include decoding nil slices as empty arrays by default, removing case-insensitive matching unless explicitly requested, rejecting duplicate keys and invalid UTF-8, and introducing caller-specified marshalers. Additionally, the v2 package splits syntax handling into a separate jsontext package and alters the meaning of omitempty to focus on empty JSON values rather than Go zero values. Open article →