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

Add option :allow_trailing_comma to JSON#parse #401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jspanjers
Copy link

@jspanjers jspanjers commented Jan 12, 2020

I think it would be really nice to support JSON arrays with trailing comma's!

@marcandre
Copy link
Contributor

Nice PR 🎉

I don't know if this will be accepted (since this goes beyond the stated goal of sticking to the RFC).

If not, you should consider making a json5 parser. The one I know about has 500k downloads despite saying "Experimental JSON5 Ruby parser - DO NOT USE". The specs are already written too :-)

@marcandre
Copy link
Contributor

Note: we already deviate from the RFC, for example with NaN, so I think this PR should be accepted.

@marcandre
Copy link
Contributor

@hsbt: can we allow this feature?

@jspanjers
Copy link
Author

Hi there,

I've rebased my feature branch to the current master to resolve some merge conflicts.
I have also added the implementation for JRuby.

Please review this pull request again and/or approve running the workflow to run the tests.

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

Successfully merging this pull request may close these issues.

None yet

2 participants