✅ 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?
2 Replies
@Ploot Doing
was the only way I could make it work
there is a big red warning for doing this, however.
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/character-encoding#serialize-all-characters
Thank you :AA_Vanilla_Pray: