Support for customizing JsonWriterOptions in JsonCoreSerializer #425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Disclaimer
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement