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

Remove leading zeros #26

Open
Erkin97-zz opened this issue Jun 12, 2020 · 1 comment
Open

Remove leading zeros #26

Erkin97-zz opened this issue Jun 12, 2020 · 1 comment

Comments

@Erkin97-zz
Copy link

Hi, when you have an unquoted string with leading zeros it removes zeros.

{ "id": 00000111 } -> { "id": 111 }
or
{ "id": A00000111 } -> { "id": "A111" }

I think it's related to Number conversion, but not sure.

@RyanMarcus
Copy link
Owner

Huh, that's a weird one! I think the "right" behavior in the first case would either be to treat the number as octal (like in JS) or to do what the parser currently does. In the second case, I would expect

{"id": "A00000111"}

I'll take a look at this soon.

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