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

Support for customizing JsonWriterOptions in JsonCoreSerializer #425

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

joelfoliveira
Copy link
Contributor

Description

The reason why accented characters were being escaped was because the stream writer was escaping those characters.

The JsonCoreSerializer only accepted customization of JsonSerializerOptions and while this allows to prevent the escape of accented characters during the serialization process, nevertheless when writing the the steam the accented characters were still being escaped.

To fix this, it was added new constructors to JsonCoreSerializer to customize the JsonWriterOptions in order to allow to specify that accented characters should not be escaped when writing to the stream.

Fixes #414

How Has This Been Tested?

Unit tests were added to validate that the fix is working as expected.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have made corresponding changes to the documentation

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

Copy link
Contributor

@brmagadutra brmagadutra left a comment

Choose a reason for hiding this comment

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

lgtm

@joelfoliveira joelfoliveira merged commit a30f81d into Farfetch:master Sep 8, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report]: JsonSerializerOptions is not forwarded to the JsonWriter
4 participants