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

Comments

Projects
None yet
4 participants
@rajender
Copy link
Contributor

commented Nov 27, 2017

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

This comment has been minimized.

Copy link
Member

commented Nov 27, 2017

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Nov 27, 2017

Sounds good. Feel free to send a change.

@gopherbot

This comment has been minimized.

Copy link

commented Nov 27, 2017

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

@gopherbot gopherbot closed this in 0d26474 Nov 27, 2017

@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.
You can’t perform that action at this time.