You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#71497 proposes adding a new JSON API, consisting of encoding/json/v2 and encoding/json/jsontext packages. The existing encoding/json package is modified to use the new v2 implementation internally. Several new functions are added to encoding/json. See that proposal for details.
I propose that we merge the implementation in github.com/go-json-experiment/json into std immediately, enabled only when the GOEXPERIMENT=jsonv2 experiment flag is set.
When the jsonv2 experiment flag is not enabled, there will be no user-visible changes to std. The encoding/json package will exist exactly as it is now, and the proposed new packages will not exist.
When GOEXPERIMENT=jsonv2 is set:
The new encoding/json/v2 and encoding/json/jsontext packages will exist.
The encoding/json package will be implemented in terms of encoding/json/v2.
The experimental API will not be bound by the Go compatibility promise and will evolve as updates are made to #71497.
If #71497 isn't approved in time for Go 1.25, we can either ship 1.25 with the GOEXPERIMENT guard or revert the experimental API in the 1.25 release. If #71497 is rejected, we'll remove the experimental package.
This proposal presumes that while there are still details being resolved, #71497 is on track for acceptance and we're happy with the general structure of the proposed API. Merging it into the main go repository prior to acceptance will make it easier for users to test out the new implementation.
The text was updated successfully, but these errors were encountered:
This is an adjunct proposal to #71497.
#71497 proposes adding a new JSON API, consisting of
encoding/json/v2
andencoding/json/jsontext
packages. The existingencoding/json
package is modified to use the new v2 implementation internally. Several new functions are added toencoding/json
. See that proposal for details.The proposed new API is implemented in
github.com/go-json-experiment/json
.I propose that we merge the implementation in github.com/go-json-experiment/json into std immediately, enabled only when the GOEXPERIMENT=jsonv2 experiment flag is set.
When the jsonv2 experiment flag is not enabled, there will be no user-visible changes to std. The
encoding/json
package will exist exactly as it is now, and the proposed new packages will not exist.When GOEXPERIMENT=jsonv2 is set:
encoding/json/v2
andencoding/json/jsontext
packages will exist.encoding/json
package will be implemented in terms ofencoding/json/v2
.encoding/json
package will include the new APIs proposed in proposal: encoding/json/v2: new API for encoding/json #71497.The experimental API will not be bound by the Go compatibility promise and will evolve as updates are made to #71497.
If #71497 isn't approved in time for Go 1.25, we can either ship 1.25 with the GOEXPERIMENT guard or revert the experimental API in the 1.25 release. If #71497 is rejected, we'll remove the experimental package.
This proposal presumes that while there are still details being resolved, #71497 is on track for acceptance and we're happy with the general structure of the proposed API. Merging it into the main go repository prior to acceptance will make it easier for users to test out the new implementation.
The text was updated successfully, but these errors were encountered: