Skip to content
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

encoding/json: reference to obselete RFC #22888

Closed
rajender opened this issue Nov 27, 2017 · 4 comments
Closed

encoding/json: reference to obselete RFC #22888

rajender opened this issue Nov 27, 2017 · 4 comments

Comments

@rajender
Copy link
Contributor

https://tip.golang.org/pkg/encoding/json/ mentions RFC 4627. The RFC 4627 is obsolete by RFC 7159.

It looks like current implementation already confirms to RFC 7159. https://play.golang.org/p/lY-b3Ia13k

Should we update the rfc no in the docs?

@ALTree ALTree added this to the Go1.10 milestone Nov 27, 2017
@bradfitz
Copy link
Contributor

You showed that we treat "2" as valid JSON. Is that related to the spec diff between RFC 4627 and RFC 7159.

I'd like to see a list of actual changes between the RFCs and then tests for those before we update the docs.

@bradfitz bradfitz modified the milestones: Go1.10, Unplanned Nov 27, 2017
@rajender
Copy link
Contributor Author

rajender commented Nov 27, 2017

Yes. RFC 4627 only allowed json text to be either object or array. RFC 7159 extended it's definition to include any value. Look at https://tools.ietf.org/html/rfc7159#page-15

Quoting that page,
"Changed the definition of "JSON text" so that it can be any JSON value, removing the constraint that it be an object or array."

@bradfitz
Copy link
Contributor

Sounds good. Feel free to send a change.

@gopherbot
Copy link

Change https://golang.org/cl/79995 mentions this issue: encoding/json: update RFC number

@golang golang locked and limited conversation to collaborators Nov 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants