The Morning Dev

Only the news worth knowing

‹
 
  • AAPL 344.17 ▼ 1.53%
  • MSFT 535.93 ▼ 3.58%
  • NVDA 181.60 ▼ 9.26%
  • GOOGL 282.57 ▼ 2.20%
  • AMZN 260.21 ▼ 2.19%
  • META 605.08 ▼ 3.96%
  • TSLA 343.69 ▼ 10.77%
  • AVGO 291.53 ▼ 10.43%
  • TSM 353.10 ▼ 10.78%
  • ORCL 115.16 ▼ 6.93%
  • AMD 404.40 ▼ 17.26%
  • NFLX 65.56 ▼ 1.25%
  • CRM 222.41 ▼ 2.07%
  • ADBE 246.44 ▼ 0.82%
  • INTC 52.25 ▼ 10.33%
  • IBM 247.11 ▼ 2.84%
  • PLTR 154.99 ▼ 9.73%
  • SNOW 269.54 ▼ 7.25%
  • NET 244.51 ▼ 8.28%
  • SAP 243.53 ▲ 1.45%

Release201 comments in the community

A new Go API for JSON

The Go Blog · By Michael Pratt, Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines, and Damien Neil ·

The Go Blog A new Go API for JSON Michael Pratt, Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines, and Damien Neil 4 November 2026 Introduction JavaScript Object Notation (JSON) is a simple data interchange format, the most popular data format used on…

The Brief

  • The Go Blog published "A new Go API for JSON" on 4 November 2026, written by Michael Pratt, Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines and Damien Neil.
  • The post introduces a new JSON API for Go; commenters name the packages encoding/json/v2 and jsontext.
  • The announcement drew 378 points and 190 comments on Hacker News and 8 points and 2 comments on Lobsters.

Why it matters

Go developers who use encoding/json will eventually need to know the new API and its changed behaviour, such as nil slices and maps marshaling as an empty JSON array or object by default, as one commenter quoted.

Who’s affected

  • Go developers using encoding/json
  • Teams maintaining Go services that serialize JSON
  • #go
  • #json
  • #stdlib
  • #encoding
  • #api-design

What developers are saying

Based on 201 comments · Mixed reactions

Commenters generally welcome the new API as a long-overdue cleanup of Go's JSON handling, with praise for the jsontext package's error handling and speed. Criticism focuses on the removal of MarshalIndent, the nil slice and map default, and the six-year timeline. Some note that the order-preserving JSON problem is still unsolved.

  • Welcome long-overdue cleanup30%
  • Missing MarshalIndent10%
  • Nil slice default concerns5%
  • Six-year timeline8%
  • AI-assisted coding context12%

In favour

  • + Marshal erroring on unmarshalable types is seen as a design flaw that the new API fixes
  • + jsontext offers specific error reporting with good performance
  • + Changes make JSON handling feel less awkward to developers

Concerns

  • − MarshalIndent was removed, which makes quick readable output harder
  • − Nil slices and maps marshaling as empty arrays or objects by default may cause bugs and need a future v3 fix
  • − Six years to land the API seems very long
  • − Preserving key order in JSON is still not solved in the standard library

“I wish they'd left `MarshalIndent` in there though.”

CamouflagedKiwi on Hacker News

“But 6 years seems like a lot of work to land a JSON API.”

cbarrick on Hacker News

“There is no introspection and speed is superb.”

txomon on Hacker News

Timeline

  1. The Go Blog publishes "A new Go API for JSON"

  2. The Go Blog

    A new Go API for JSON

  3. Hacker News

    384 points · 199 comments

  4. Lobsters

    8 points · 2 comments

How do you feel about this?

0 Comments

    More in Backend