Go 1.27 has made the encoding/json/v2 and encoding/json/jsontext packages generally available following an experimental phase launched last year. These new components address legacy behavioral shortcomings, including case-insensitive unmarshaling, trailing data errors with io.Reader, and the practice of serializing nil slices or maps as null. Additionally, the new implementation removes performance bottlenecks caused by MarshalJSON requiring allocated byte slices and utility functions writing solely to bytes.Buffer.
Key points
The updated JSON architecture resolves critical security and compliance issues that exist…: The updated JSON architecture resolves critical security and compliance issues that existed in Go for over 15 years.
Usability is improved by addressing io.Reader trailing data errors and expanding configur…: Usability is improved by addressing io.Reader trailing data errors and expanding configuration passing across the call stack.
The new packages eliminate unnecessary memory allocations to establish significantly bett…: The new packages eliminate unnecessary memory allocations to establish significantly better performance defaults for serialization workflows.
Sources checked by our analysis pipeline: 1
The Go Blog
A new Go API for JSON
Introduction
JavaScript Object Notation (JSON) is a simple data interchange format, the most popular data format used on the internet, and widely read and written by Go programs. Go has included support for JSON in the standard library since well before Go 1.0. We first we wrote about support for JSON in Go more than 15 years ago!
Over time, packages evolve with the needs of their users, and encoding/json
is no exception.
Last year, we wrote about a new experimental API for JSON designed to bring long-awaited improvements and fixes.
After additional feedback and refinement, the new encoding/json/v2
and encoding/json/jsontext
packages are stable and generally available in Go 1.27!
This post is an updated version of the article introducing the experiment, describing the problems with encoding/json
, and an introduction to the new packages.
Problems with encoding/json
Overall, encoding/json
has held up well.
The idea of marshaling and unmarshaling arbitrary Go types
with some default representation in JSON, combined with the ability to
Users distributing files publicly across the platform face direct moderation under newly revealed company policies. The screening mechanism targets publicly accessible material to prevent the spread of prohibited files. Users found hosting inappropriate assets risk losing access to their files and having their broader network privileges suspended.
Major retailers including Amazon, Best Buy, and the official Google Store are offering price cuts reaching up to $350 across the entire new flagship smartphone lineup through November 8. Customers can stack these direct reductions with aggressive hardware exchange credits to dramatically lower out-of-pocket upgrade costs. This strategy makes premium hardware configurations nearly identical in cost to standard entry-level tiers.
Microsoft has rolled out testing features to cut input latency and lower the barrier to entry for streaming titles. Players can now establish direct Wi-Fi links with dedicated hardware or turn personal mobile devices into virtual gamepads on smart TVs. These updates aim to deliver a more responsive experience while eliminating the immediate requirement of owning a physical Bluetooth peripheral.