Skip to content

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