I serialize and save a lot of data with the help of the following code
using var stream = File.Create("file.json");
await System.Text.Json.JsonSerializer.SerializeAsync(stream, data, new JsonSerializerOptions
{
WriteIndented = true
});
But the data is saved as follows
{
"MyProperty": "\u0633\u0644\u0627\u0645",
"MyProperty2": "\u0634\u0633\u06CC\u0634\u0633\u06CC"
}
How can I set the encoding to UTF-8 or Unicode when saving?