What changed
On November 4, 2026, the Go team announced that encoding/json/v2 and encoding/json/jsontext are stable and generally available in Go 1.27, after experimentation in Go 1.25. The v2 API rejects duplicate JSON object keys and invalid UTF-8 by default, matches struct fields case-sensitively, changes nil slice/map encoding and omitempty semantics, and exposes streaming marshal/unmarshal operations. The existing encoding/json v1 remains supported indefinitely and is implemented using the v2 engine with compatibility options.
Why it matters
JSON is a core boundary for Go web services and integrations. Ambiguous duplicate keys, lenient Unicode handling and surprising case-insensitive field matching can produce security or interoperability problems. The stable v2 API provides safer defaults and true streaming without forcing existing code to migrate immediately. Developers must test behavioural differences before switching, especially around empty values, time.Duration, struct matching and custom marshalers.
Strict parsing changes what inputs are accepted
Version 2 rejects invalid UTF-8 and duplicate object members and uses case-sensitive field matching by default. These differences improve predictable cross-system interpretation but can break callers that relied on permissive v1 behaviour.
Streaming and extensibility become first-class
The jsontext Encoder/Decoder work with tokens and values; v2 adds MarshalWrite, UnmarshalRead, MarshalEncode and UnmarshalDecode plus caller-configurable options and new streaming custom marshaler interfaces. That can avoid buffering and repeated parsing for some workloads.
Compatibility is a gradual migration, not a flag day
The old encoding/json API remains supported. Under the hood, v1 is implemented on the v2 engine with v1 compatibility options, allowing v1 and v2 custom methods to interoperate. Teams can adopt v2 callsite by callsite and explicitly opt into old behaviours where required.
Performance claims need workload testing
The Go team reports unmarshalling improvements reaching 10x in some benchmarks, with marshal performance roughly comparable. Those results are upstream measurements, not a guarantee for an individual application. Benchmarks and regression tests should cover actual schemas, allocations and streaming behaviour.