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

Do not permit leading zeros in JSON numbers #3167

Merged
merged 1 commit into from
Jun 4, 2019

Conversation

lukeasrodgers
Copy link
Contributor

Fixes #3097

I am very new to pony, so entirely possible I've done something obviously wrong here, or mucked up some style stuff.

Played around with a couple different implementations, including passing a flag to _parse_decimal to indicate whether it should check for leading zeros (not in the case of exp/frac), but this approach seemed clearer.

@SeanTAllen SeanTAllen added changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge changelog - changed Automatically add "Changed" CHANGELOG entry on merge labels Jun 4, 2019
@SeanTAllen SeanTAllen changed the title Do not permit leading zeros in JSON numbers, as per RFC 8259 Do not permit leading zeros in JSON numbers Jun 4, 2019
@sylvanc
Copy link
Contributor

sylvanc commented Jun 4, 2019

This is fabulous, thank you!

@SeanTAllen
Copy link
Member

Hell yeah!

@SeanTAllen SeanTAllen merged commit a919102 into ponylang:master Jun 4, 2019
@lukeasrodgers lukeasrodgers deleted the json-leading-zeros branch June 4, 2019 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - changed Automatically add "Changed" CHANGELOG entry on merge changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

json parser accepts numbers with leading zeros
3 participants