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

fix leading zeroes json bug #6

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

Conversation

rodryquintero
Copy link

On some browser number with leading zeroes are considered strings. When
receiving json number values with leading zeroes, instead of a string,
an error occurs.

This change checks that the number does not contain leading zeroes.

On some browser number with leading zeroes are considered strings. When
receiving json number values with leading zeroes, instead of a string,
an error occurs.

This change checks that the number does not contain leading zeroes.
@mccrackend
Copy link
Member

@rodryquintero Mind writing a test for this before I merge? Thanks for your support.

@rodryquintero
Copy link
Author

I would if I knew how 😃

El El mar, 1 de mar de 2016 a las 10:06 p.m., Dan McCracken <
[email protected]> escribió:

@rodryquintero https://github.com/rodryquintero Mind writing a test for
this before I merge? Thanks for your support.


Reply to this email directly or view it on GitHub
#6 (comment).

@uvg
Copy link
Contributor

uvg commented Mar 31, 2016

Please notice that i changed it to elseif (+data=data) { .... (in ClassMethod Encode @ Class CacheJSON).
And about the tests i believe that @KarlPurk allready added them to Class TestJSON (look at methods TestLeadingZerosValuesAreEscaped, TestZeroValueIsNotEscaped, TestZeroFollowedByDecimalIsNotQuoted, TestMultipleZerosFollowedByDecimalIsQuoted)

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.

3 participants