Skip to content

Parse decimals and ints with InvariantCulture since JSON/YAML doesn't vary by culture. #326

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

Merged
merged 1 commit into from
Oct 2, 2018

Conversation

PerthCharern
Copy link
Contributor

Parse decimals and ints with InvariantCulture since JSON/YAML doesn't vary by culture.

For example, the parser should always treat 100.000 as one hundred, not one hundred thousand, even if the operating system on the machine is set to use French.

Fix #323

…YAML doesn't vary by culture.

For example, the parser should always treat 100.000 as one hundred, not one hundred thousand, even if the operating system on the machine is set to use French.
@PerthCharern
Copy link
Contributor Author

Note that bool.Parse is already always cultureInvariant (that culture parameter doesn't exist). It only recognizes "true" and "false" regardless of culture.

Copy link
Member

@Shwetap05 Shwetap05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@PerthCharern PerthCharern merged commit e8f55b1 into master Oct 2, 2018
@PerthCharern PerthCharern deleted the perthcharern/FixCultureInfo branch October 2, 2018 23:05
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.

2 participants