TL;DR
Get business pricing on monitors, keyboards and dev gear
- Business-only prices and quantity discounts
- Tax-exempt purchasing
- Multiple users, one account, clear invoices
Go 1.27 includes stable, generally available encoding/json/v2 and encoding/json/jsontext packages, following an experimental period and feedback from users. The new APIs are designed to address behavioral, usability and performance limits in the long-standing encoding/json package; migration details and the precise compatibility path are not covered in the supplied report.
Go 1.27 includes two stable, generally available JSON packages, encoding/json/v2 and encoding/json/jsontext, the Go team announced on November 4. The packages follow an experimental API and subsequent user feedback, and are intended to address longstanding limitations in the standard library’s existing encoding/json package.
In a report published on the Go blog, authors Michael Pratt, Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines and Damien Neil describe the new packages as the result of additional feedback and refinement after an experimental release discussed the previous year. The report introduces the packages and explains the problems that motivated a separate API. It does not say that the existing encoding/json package has been removed.
The team identifies concerns with how the older package handles JSON input and output. Among them, it accepts invalid UTF-8 and objects with duplicate member names, even though such inputs can be ambiguous or inconsistent with current expectations for JSON. The report says duplicate names can create security risks when different implementations interpret the same object differently. It also notes that the existing package matches JSON member names to Go struct fields case-insensitively and marshals nil slices and maps as null, behaviors that can surprise users or cause interoperability problems.
The report also describes limits in the old API and its performance model. Options available through Encoder and Decoder cannot be used with the top-level Marshal and Unmarshal functions, and custom methods do not consistently inherit options such as rejecting unknown fields. Although the encoder and decoder work with readers and writers, the team says they buffer complete JSON values. The new packages are presented as a redesign intended to address these categories of shortcomings, rather than as a small fix to the old API.
A New Path for Go JSON
JSON is used widely for communication between applications, and Go programs have had standard-library support for it since before Go 1.0. A stable alternative matters to developers who need stricter input handling, more flexible configuration or different performance characteristics, particularly where Go services exchange data with other implementations.
The security concern described by the Go team is specific: duplicate object names can be interpreted differently by separate parsers, and invalid UTF-8 can lead to silent data corruption in the old package. Those risks do not establish that every application using encoding/json is vulnerable. They do explain why safer default behavior and clearer control over parsing are relevant to developers processing untrusted or cross-system data.
Making the packages generally available also gives teams a supported standard-library option to evaluate, rather than an experiment. At the same time, the announcement alone does not establish that switching will be automatic or appropriate for every codebase. The older package’s behavior may be relied on by existing applications, so teams will need to review compatibility and test the new API against their own data and custom JSON methods.
Products Worth Considering

Samsung Galaxy Tab A7 Lite 8.7 32GB Wi‑Fi Android Tablet – Long‑Lasting Battery, Compact Slim Design, Sturdy Metal Frame (US Version)

Amazon Kindle Scribe (64GB) with Premium Pen, Metallic Jade

Bose SoundLink Flex Bluetooth Speaker (2nd Gen) – Portable Outdoor Speaker with Hi‑Fi Audio, Waterproof and Dustproof, USB‑C, Up to 12 Hours
As an affiliate, we earn on qualifying purchases.
Why the Original API Fell Short
The original encoding/json package has served Go programs for many years. The Go blog says its core approach—mapping Go values to JSON by default while allowing types to customize that representation—has proved flexible. But accumulated user needs and changes in expectations for JSON handling exposed problems that are difficult to correct without breaking existing programs.
Some issues reflect choices applications may already depend on. The report says pointer-receiver MarshalJSON methods are called inconsistently because of an implementation detail, but changing that behavior could disrupt users. Other limitations stem from the public interfaces: MarshalJSON returns a byte slice, while UnmarshalJSON receives a complete JSON value. Those requirements constrain allocation and parsing, and can result in the same value being parsed more than once.
The Go team’s stated reasoning is that these shortcomings are inherent in the old API and are practically impossible to fix within it without compatibility costs. The new packages therefore provide a distinct route for changes, while the announcement retains encoding/json as the established package rather than describing an immediate replacement.
““After additional feedback and refinement, the new encoding/json/v2 and encoding/json/jsontext packages are stable and generally available in Go 1.27!””
— The Go blog authors
Migration Details Still Unspecified
The supplied announcement does not spell out how developers should migrate existing code, whether particular behaviors can be selected through compatibility options, or how the two new packages divide responsibilities in detail. It also gives no benchmarks or quantified performance results, so claims of improved speed or reduced memory use cannot be drawn from this report alone.
The announcement does not describe the full behavior of the new APIs for each issue raised about encoding/json. The older package’s long-standing behavior may remain important to existing applications, but the source material does not set out a deprecation schedule or say that encoding/json will be discontinued. Developers should treat the stated motivations as the Go team’s rationale and consult package documentation for exact semantics.
Documentation and Adoption Steps
With the packages stable in Go 1.27, the next practical step for Go developers is to review the package documentation and release information, then test the APIs against representative inputs, custom marshalers and unmarshalers, and any data exchanged with other systems. Particular attention may be warranted for applications that currently depend on case-insensitive field matching, duplicate names, null values for nil collections, or decoder options.
The source report does not announce a future milestone beyond general availability. Adoption will depend on project requirements and compatibility testing; the announcement provides no timetable for deprecating the older package or for changing existing applications.
Key Questions
What did Go announce?
The Go team announced that encoding/json/v2 and encoding/json/jsontext are stable and generally available in Go 1.27, after an experimental phase and additional feedback.
Does the new API replace encoding/json?
The announcement presents the new packages as a separate API to address limitations in encoding/json. It does not say that the older package has been removed or give a deprecation date.
What problems motivated the new packages?
The Go team cites issues including acceptance of invalid UTF-8 and duplicate object names, case-insensitive field matching, limited option handling, and buffering and parsing constraints in the old API.
Are performance improvements confirmed?
The report describes performance limitations in the old API and presents a redesign, but the supplied material includes no benchmarks or measured performance gains. Specific improvements should not be assumed without further evidence.
When should developers migrate?
The announcement gives no migration deadline. Developers can assess the new package documentation and test compatibility with their own applications before deciding whether to adopt it.
Source: go.dev
