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

UnicodeJsonConverter is the wrong way to encode strings with System.Text.Json #136

Open
rjgotten opened this issue Jun 3, 2024 · 0 comments

Comments

@rjgotten
Copy link

rjgotten commented Jun 3, 2024

System.Text.Json supports encoding schemes using the JavaScriptEncoder class directly via its serializer options.
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/character-encoding

Using a converter for this is an anti-pattern and might double up on the time spent on escaping.

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

1 participant