Skip to content

New JKParseOptionPermitLeadingZero option#127

Open
robertmryan wants to merge 2 commits intojohnezang:masterfrom
robertmryan:master
Open

New JKParseOptionPermitLeadingZero option#127
robertmryan wants to merge 2 commits intojohnezang:masterfrom
robertmryan:master

Conversation

@robertmryan
Copy link
Copy Markdown

Normally when parsing numeric values, leading zeros are considered a parsing error. This is the correct behavior, but while assisting an individual diagnose a parsing error due to incorrectly formed JSON (see this Stack Overflow question), I suggested that he might be able to adjust jk_parse_number to permit leading zeros.

So, I offer this pull request with trepidation (as the correct resolution for that individual's problem is to fix his JSON), but nonetheless I thought I'd share this with you. Feel free to accept, improve, or simply reject/close this pull request as you see fit.

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.

1 participant