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

Parsing Doubles fails if current CultureInfo is using a different decimal separator. #10

Open
fixed opened this issue Jun 18, 2015 · 1 comment

Comments

@fixed
Copy link

fixed commented Jun 18, 2015

I tried to parse a JSON in the Unity editor on Mac OS X, and it seems that the current CultureInfo is using a different decimal separator on my system. Hence, it fails to parse floating point numbers.
The solution is to parse doubles with the invariant NumberFormatInfo, like it was written in JSONWriter.

@jacattrongnlh
Copy link

I spent half a day looking for why my game doesn't work correctly on some devices. Turn out it breaks on phone using a localization different from English.
And I made the same fix as yours.

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