Instead of writing the UTF8 characters, the serializes uses the UTF8 code values instead.
To avoid this, use the following:
var options = new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
WriteIndented = true
};
var serialized = JsonSerializer.Serialize(someObject, options);
Tags
ASP .NET core