Go: the future encoding/json/v2 module

Christophe Colombier - May 2 - - Dev Community

Here is a current implementation of the future encoding/json/v2 in Go

GitHub logo go-json-experiment / json

Experimental implementation of a proposed v2 encoding/json package

JSON Serialization (v2)

GoDev Build Status

This module hosts an experimental implementation of v2 encoding/json The API is unstable and breaking changes will regularly be made Do not depend on this in publicly available modules.

Any commits that make breaking API or behavior changes will be marked with the string "WARNING: " near the top of the commit message. It is your responsibility to inspect the list of commit changes when upgrading the module. Not all breaking changes will lead to build failures.

A Discussion about including this package in Go as encoding/json/v2 has been started on the Go Github project on 2023-10-05. Please provide your feedback there.

Goals and objectives

  • Mostly backwards compatible: If possible, v2 should aim to be mostly compatible with v1 in terms of both API and default behavior to ease migration For example, the Marshal and Unmarshal functions are the most widely used declarations in the v1…

This project is not only a proof of concept, but also an idea of the future implementation that will help sorting out many issues with current encoding/json

You get some information in this GitHub issue

https://github.com/golang/go/discussions/63397

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .