-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
Milestone
@paulhammond Output of
Description
Go version
go version go1.25.0 linux/arm64
Output of go env
in your module/workspace:
n/a
What did you do?
I want to read and write JSON using Go, so I read the documentation.
What did you see happen?
The 6th sentence of the docs for encoding/json says "New usages of JSON in Go are encouraged to use encoding/json/v2 instead."
The 5th sentence of the docs for encoding/json/v2 says "Most users should use encoding/json."
These recommendations seem to conflict.
What did you expect to see?
I expected clear guidance on which JSON package I should use.
For the record, I've been following all the discussions about json/v2, and I know that the actual answer for my specific project is encoding/json
, at least for now. I'm reporting this bug as I think the documentation should be clearer, especially for people who do not closely follow the development of the language.