DEV Community

Aleksei Aleinikov
Aleksei Aleinikov

Posted on

๐ŸŒ€ JSON v2 in Go (2025): What Actually Changed

Goโ€™s new JSON stack landed in 2025 โ€” but what really changed, and do you need to rewrite your code?

Hereโ€™s the short version:

โ€ขโœ… Your old Marshal/Unmarshal still works (no big migration)
โ€ขโšก New helpers: MarshalWrite, UnmarshalRead for direct I/O
โ€ข๐Ÿ“ก Real streaming via jsontext.Encoder/Decoder
โ€ข๐Ÿท๏ธ Smarter field tags (inline, format:DateOnly, unknown)
โ€ข๐Ÿš€ Faster decoding + stricter defaults (catch bugs early)

Think of JSON v2 as a tightened toolkit: same foundations, but with better defaults, streaming, and performance.

๐Ÿ‘‰ Full breakdown with practical examples here:
https://levelup.gitconnected.com/json-in-2025-what-actually-changed-in-v2-and-how-to-use-it-27d99efc5fcb

Top comments (0)