01go.dev
A new Go API for JSON
Go 1.27 makes encoding/json/v2 and encoding/json/jsontext stable and generally available, addressing longstanding limitations in encoding/json while preserving compatibility. jsontext adds streaming syntax-level encoding and decoding of JSON values and tokens; v2 adds option-aware Marshal/Unmarshal APIs, customization interfaces, stricter UTF-8 and duplicate-name handling, case-sensitive field matching, and safer nil collection defaults. Unmarshal is up to 10x faster, while v1 remains supported and interoperable through v2’s compatibility options.