Go Gets a New JSON API

November 5, 2026, morning

Go 1.27 ships a brand new JSON package, and it fixes problems that have been annoying Go developers for over 15 years. The team at Google finally merged encoding/json/v2 and encoding/json/jsontext into the standard library as stable, generally available packages[1].

The original encoding/json has held up remarkably well for a package older than Go 1.0 itself, but the years exposed real shortcomings. Imprecise handling of JSON syntax, performance bottlenecks on large payloads, and a marshaling API that made it hard to customize behavior without writing awkward wrapper types. The new API addresses all of these.

What Changed

The v2 package introduces a cleaner separation between JSON syntax (handled by jsontext) and Go type marshaling (handled by json/v2). This split means you can work with raw JSON tokens without pulling in the full marshal/unmarshal machinery, and vice versa.

Some highlights:

The old encoding/json package is not going away. It remains in the standard library for backwards compatibility. But the Go team recommends new code use v2[1].

Why It Matters

JSON is the most popular data interchange format on the internet. Go is one of the most popular languages for building web APIs and backend services. The gap between what Go's JSON package could do and what developers needed it to do has been a persistent source of frustration, workaround libraries, and Stack Overflow questions for years.

The v2 package is the result of a multi-year effort that went through an experimental phase, community feedback, and multiple rounds of refinement. The fact that it shipped as stable in Go 1.27 means the team is confident in the API surface and ready for production use[1].

Parallel Tracks

The same Go release cycle also brought OpenAI's "thousand fewer paths to root" security work into Go's vulnerability database workflow[2], and the Kimi K3.1 Pro model weights landed on HuggingFace the same day[3]. A busy week for infrastructure.

For anyone writing Go services that touch JSON, which is basically everyone writing Go services, the v2 package is worth migrating to. The API is cleaner, the behavior is more predictable, and the performance is better. Fifteen years is a long time to wait for a do-over, but this one looks like it was worth it.


[1] A new Go API for JSON, Go Blog, November 4, 2026
[2] A thousand fewer paths to root, OpenAI, November 2026
[3] Kimi K3.1 Pro model weights, HuggingFace, November 2026