go.dev·4 november 2026
A new Go API for JSON

technology
API
data interchange
Go programming language
JSON
marshaling
performance
standard library
unmarshaling
UTF-8
go.dev
Go 1.27 introduces stable encoding/json/v2 and encoding/json/jsontext packages, addressing long-standing issues with the original encoding/json API. The new API improves JSON syntax handling, fixes behavior flaws like duplicate member names and nilness leaks, and enhances performance. It also resolves API deficiencies, such as case-insensitive unmarshaling and inconsistent method calling. These updates make JSON processing in Go more robust and secure.