Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

x/pkgsite: don't set jsonv2 tag when showing encoding/json documentation #75170

Open
Labels
DocumentationIssues describing a change to documentation. NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Milestone
@paulhammond

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation. NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /