Get the latest tech news

A new experimental Go API for JSON


Go 1.25 introduces experimental support for encoding/json/jsontext and encoding/json/v2 packages.

It’s worth noting that it’s largely been developed and promoted by people not employed by Google, demonstrating that the Go project is a collaborative endeavor with a thriving global community dedicated to improving the Go ecosystem. To resolve the fundamental performance problems with the MarshalJSON and UnmarshalJSON interface methods, we need an efficient way of encoding and decoding JSON as a streaming sequence of tokens and values. The re-implementation of v1 in terms of v2 aims to provide identical behavior within the bounds of the Go 1 compatibility promise, though some differences might be observable such as the exact wording of error messages.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of json

json

Related news:

News photo

How to safely escape JSON inside HTML SCRIPT elements

News photo

Json2dir: a JSON-to-directory converter, a fast alternative to home-manager

News photo

Spotting base64 encoded JSON, certificates, and private keys