Go 1.27 stabilizes JSON APIs with a separate streaming layer
Go’s encoding/json/v2 and encoding/json/jsontext are stable in Go 1.27. The redesign separates JSON syntax processing from conversion between JSON and Go values, letting custom methods read and write through streaming encoders instead of repeatedly creating and reparsing complete byte slices. A separate version also permits behavior changes that the original package cannot adopt without breaking existing programs.
The Go Team · Nov 4, 2026
Why it matters
An API’s contract can create allocation and parsing costs that optimizing the implementation alone cannot remove.
More context
Try a small migration with Go 1.27 and tests for your actual wire format. The November 4 article explains the stable APIs after last year’s experiment, including first-class options and reader/writer helpers. Pay attention to ambiguous inputs, nil collections and custom marshaling behavior.
Keep in mind
The new package is not a promise that changing imports preserves every observable behavior or speeds up every workload; benchmark and compare encoded output before migrating.
Original read