Skip to content

Remove relying on "encoding/json" #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dsnet
Copy link
Contributor

@dsnet dsnet commented Jul 12, 2025

This originally depended on "encoding/json" if no options are passed and only depended on "github.com/go-json-experiment/v1" if options are passed.

This was a faulty attempt at making it possible to detect divergences in behavior between the two, but it does not work.

We may need to add explicit API to detect regressions between "encoding/json" and "github.com/go-json-experiment/json/v1". However, this is complicated by the fact that they will actually be the same package once Go 1.25 is released and
the binary is built with GOEXPERIMENT=jsonv2.

This originally depended on "encoding/json" if no options are passed and
only depended on "github.com/go-json-experiment/v1" if options are passed.

This was a faulty attempt at making it possible to detect
divergences in behavior between the two, but it does not work.

We may need to add explicit API to detect regressions between
"encoding/json" and "github.com/go-json-experiment/json/v1".
However, this is complicated by the fact that they will actually
be the same package once Go 1.25 is released and
the binary is built with GOEXPERIMENT=jsonv2.
@dsnet dsnet requested review from johanbrandhorst and mvdan July 12, 2025 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants