Don't unescape unicode characters in System.Text.Json

Viewed 92

I have the following JSON string that I read with the System.Text.Json library and I want to deserialize:

{
  "name": "\ud092\u00d0"
}

When I use the JsonSerializer.Deserialize method it of course decodes the \uXXXX to the appropriate characters.

What I want is to disable this and get the string as it is in the original JSON string: \ud092\u00d0. How can I accomplish that?

0 Answers
Related