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

JsonSerializer does not respect Culture when deserializing primitive types #1606

Merged
merged 1 commit into from Jul 15, 2021

Conversation

Georgiks
Copy link
Contributor

@Georgiks Georgiks commented Jul 7, 2021

Description

When deserializing any primitive type (floating point types especially), the JsonSerializer uses Convert.ChangeValue without passing Culture property, which results in using CurrentCulture as default.
I don't seem to find any other effective way how to enforce the RestSharp to deserialize primitive value using using custom Culture.

Purpose

This pull request is a:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@alexeyzimarev alexeyzimarev merged commit 80e23bc into restsharp:dev Jul 15, 2021
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.

None yet

2 participants