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?
to your account
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?
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
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."
Sounds good. Feel free to send a change.
Change https://golang.org/cl/79995 mentions this issue: encoding/json: update RFC number
encoding/json: update RFC number
No branches or pull requests