© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
3 replies
Ploot

✅ JsonSerializer ignoring encoding options?

This issue has been driving me crazy for the last hour. I have a json object that includes a string with an apostrophe in it, however it keeps getting converted to a unicode code.
After some reading I found this was the default behaviour for the serializer and can be overridden with encoder options, however I have been totally unable to override this behaviour for some reason.

This is the dotnetfiddle snippet I've been testing with https://dotnetfiddle.net/7VZABE. Am I doing something wrong here?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

JsonSerializer escaping '&'
C#CC# / help
2y ago
Anomaly with JsonSerializer
C#CC# / help
16mo ago
❔ ✅ JsonSerializer not serializing dictionary
C#CC# / help
4y ago
JsonSerializer serialize 2 objects
C#CC# / help
4y ago