---
title: "Considering a v2 of encoding/json"
publication: "Go Weekly"
issue: 479
published_at: "2023-10-10"
canonical_url: "https://golangweekly.com/issues/479"
---

Plus getting your head around type inference in Go. |        

#​479 — October 10, 2023 

[Unsub](https://golangweekly.com/leave/*|UID|*)|[Web Version](https://golangweekly.com/issues/479)  

Together with [![Crunchydata\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_430,h_100/e_make_transparent/co_white,e_outline:7/xyflkz7n00elwtgja9ne.png)](https://www.crunchydata.com/products/crunchy-bridge?utm_source=cpgo-prim-1010)  

Go Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/k1w7h25y2sdbiiatfdep.jpg)](https://github.com/golang/go/discussions/63397)  

[Thinking About a Better `encoding/json`](https://github.com/golang/go/discussions/63397) — Led by Joe Tsai, but with input from several fellow gophers, this is a discussion to kickstart the process of potentially modernizing the long-standing `encoding/json` package by way of a new v2 version (which already has [an experimental implementation to play with.](https://pkg.go.dev/github.com/go-json-experiment/json)) 

Joe Tsai et al.   

[Everything You Always Wanted to Know About Type Inference (And a Little Bit More)](https://go.dev/blog/type-inference) — Type inference allows Go's compiler to determine types _without_ explicit annotations. In this post, built upon a talk he recently gave at GopherCon, Robert Griesemer of the core Go team runs through everything you need to know around a commonly misunderstood topic. 

Robert Griesemer   [![\](https://copm.s3.amazonaws.com/5293d39d.png)](https://www.crunchydata.com/products/crunchy-bridge?utm_source=cpgo-prim-1010) 

[❤️ Postgres](https://www.crunchydata.com/products/crunchy-bridge?utm_source=cpgo-prim-1010) — You need a database provider that loves Postgres as much as you do. We'll take care of all the hassle - monitoring, backups, HA, disaster recovery so you don't have to. Want amazing support? We'll be there when you have questions. 

Crunchy Bridge sponsor   

[Go Database Driver Overhead on Insert-Heavy Workloads](https://notes.eatonphil.com/2023-10-05-go-database-sql-overhead-on-insert-heavy-workloads.html) — For INSERT-heavy workloads in Go Phil suggests switching database drivers — specifically noting that there is now “_likely no good reason to use `lib/pq` anymore for accessing PostgreSQL from Go_”. He suggests [pgx](https://github.com/jackc/pgx) instead. 

Phil Eaton    

**IN BRIEF:** 

- 📢 [Go 1.21.2 and 1.20.9](https://groups.google.com/g/golang-announce/c/XBa1oHDevAo/m/desYyx3qAgAJ) have been released, but [1.21.3 and 1.20.10](https://groups.google.com/g/golang-announce/c/XIujkcMT56U) are expected later _today._ All these releases include security fixes.
- 📰 Bill Kennedy wrote in to let us know that his [Ultimate Go Tour](https://tour.ardanlabs.com/) is now being translated to numerous other world languages with [_Persian_](https://tour.ardanlabs.com/tour/per/list) being the first to be available. Twelve other languages are due to follow soon.
- 📗 [Learn Go with Pocket-Sized Projects](https://www.manning.com/books/learn-go-with-pocket-sized-projects) is a new book being published by Manning later this month, but most of it is already available in an early access form.    

[A Web Server ‘Hello World’ Benchmark: Go vs Node vs Nim vs Bun](https://lemire.me/blog/2023/10/07/web-server-hello-world-benchmark-go-vs-node-js-vs-nim-vs-bun/) — The standard disclaimer applies: benchmarks are difficult and don’t always measure what you _should_ care about. Nonetheless, here’s a quick example comparing the _simplest_ of HTTP servers using Go, Node, Bun and Nim. 

Daniel Lemire   

[An Attempt at Visualizing the Go GC](https://www.aadhav.me/posts/visualizing-the-go-gc/) — Aadhav’s talk proposal for GopherCon India ‘23 may have been rejected, but he has turned his disappointment into an interesting blog post about his experiments. 

Aadhav Vignesh   

📈 It's not _exactly_ the same, but [Statsviz](https://github.com/arl/statsviz) is a neat tool for visualizing real time plots of runtime metrics relating to your programs and just had a new release.  

[Adding Icons to Go-built Windows Executables](https://hjr265.me/blog/adding-icons-for-go-built-windows-executable/) — If you’ve built an app and want its `.exe` to have a nicer icon, [rsrc](https://github.com/akavel/rsrc) provides a way to do it. 

Mahmud Ridwan  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/km9znpmimnfvpjskmsbe.jpg)](https://github.com/charmbracelet/mods/releases/tag/v1.0.0)  

[Mods 1.0: Command Line AI from Charm](https://github.com/charmbracelet/mods/releases/tag/v1.0.0) — Those _Charm_ folks (of [Bubble Tea](https://github.com/charmbracelet/bubbletea) fame) recently released an OpenAI powered command line AI tool to help you analyze code, write docs, and more. v1.0 adds streaming responses, saved conversations, and Azure OpenAI support. 

Charm   

[templ: A Way to Build HTML with Go](https://templ.guide/) — Create components that render fragments of HTML and compose them to create screens, pages, documents, and apps. [GitHub repo.](https://github.com/a-h/templ) 

Adrian Hesketh   

[Sqinn: Access SQLite Databases Without Cgo](https://github.com/cvilsmeier/sqinn-go) — It instead uses an intermediary that communicates over I/O streams/stdin/stdout. 

Christoph Vilsmeier   

[💻 Hired Makes Job Hunting Easy](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-golangweekly%29&utm_content=find-your-next-job) — Instead of chasing recruiters, companies approach you with salary details up front. [Create a free profile now](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-golangweekly%29&utm_content=find-your-next-job). 

Hired sponsor   

- [Viper 1.17](https://github.com/spf13/viper/releases/tag/v1.17.0) – A hugely powerful and flexible app configuration solution for Go apps. v1.17 _requires_ Go 1.19 and adds `log/slog`support.
- [Requests 0.23.5](https://github.com/carlmjohnson/requests/releases/tag/v0.23.5) – The convenient HTTP request library has added support for changing the default JSON serializer/deserializer or setting it on a per-request basis.
- [Task v3.31.0](https://github.com/go-task/task/releases/tag/v3.31.0) – Imagine if `make` were reimplemented in Go. ([Homepage.](https://taskfile.dev/))
- [Roaring 1.6](https://github.com/RoaringBitmap/roaring) – 'Roaring' bitmap data structure implementation.
- [Betteralign 0.3.1](https://github.com/dkorunic/betteralign) – Detect structs whose elements could be better aligned.
- [Ginkgo 2.13](https://github.com/onsi/ginkgo) – Modern testing framework.    

**🕰 ICYMI** (_Some older stuff that's still worth checking out_)  

- Adebayo Adams shares some of the basics of [handling dates and times effectively](https://www.honeybadger.io/blog/complete-guide-to-dates-and-times-in-go/) in Go apps.
- A complete series of posts from Will Roden [exploring writing a `slog` handler](https://willabides.com/posts/go-slog-handler-part-1/). The first is an introduction to the `log/slog` package.
- [Shane shares a comparison](https://shane.ai/posts/threads-and-goroutines/) of creating 1 million threads using Rust vs creating 1 million goroutines.           

Curated by Peter Cooper and [Glenn Goodrich](https://twitter.com/ruprict). 

[Change your email](https://golangweekly.com/edit_subscription/*|UID|*)
[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
