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

JSON library should not allow comments #111

Closed
venables opened this issue Dec 16, 2011 · 2 comments
Closed

JSON library should not allow comments #111

venables opened this issue Dec 16, 2011 · 2 comments

Comments

@venables
Copy link

The JSON spec does not allow comments. This gem allows comments.

Test:

require 'json'
JSON.parse("{ \"someKey\":\"someValue\", /* Some comment */ \"someOtherKey\":[\"some\",\"array\"]}")

Result:

{"someKey"=>"someValue", "someOtherKey"=>["some", "array"]}

Because of this, the following claim from the README is false: "This is a implementation of the JSON specification according to RFC 4627 www.ietf.org/rfc/rfc4627.txt"

@nurse
Copy link
Member

nurse commented Dec 26, 2011

The RFC says "A JSON parser MAY accept non-JSON forms or extensions."

@venables
Copy link
Author

Good enough for me.

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

No branches or pull requests

2 participants