{
  "id": 18164287,
  "title": "A New Go API for JSON",
  "url": "https://urgent.news/2026/11/04/a-new-go-api-for-json",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-04T17:52:11.000Z",
  "source": {
    "name": "Hacker News",
    "slug": "hacker-news",
    "url": "https://go.dev/blog/jsonv2"
  },
  "original_language": "en",
  "account": "The JSON (JavaScript Object Notation) format is a popular data interchange format used extensively on the internet. Go, a programming language, has included support for JSON in its standard library since before version 1.0. Over the years, the encoding/json package has been refined to meet users' evolving needs. Recently, a new experimental API for JSON was introduced, aiming to bring long-awaited improvements and fixes. After gathering feedback and performing refinements, the new encoding/json/v2 and encoding/json/jsontext packages are now stable and available in Go 1.27.\n\nDespite the success of encoding/json, several shortcomings have been identified. The package has been prone to various behavioral flaws. For instance, it imprecisely handles JSON syntax, accepting invalid UTF-8 and duplicate member names in objects. It also leaks the nilness of slices and maps, marshaling nil slices or maps as JSON nulls, which can lead to errors in other implementations. Additionally, the case-insensitive unmarshaling may result in security vulnerabilities and performance limitations. The API can be tricky and restrictive, making it challenging to unmarshal from an io.Reader and limiting the flexibility of options.\n\nThese issues, inherent to the existing API, are difficult to fix within the Go 1 compatibility promise. However, with the introduction of encoding/json/v2 and encoding/json/jsontext packages, Go 1.27 addresses these concerns. These new packages offer a stable and generally available solution, providing enhanced functionality and addressing the shortcomings of the existing encoding/json package.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}