I have this code
[Fact]
public void TestContactNew()
{
var options = new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All),
WriteIndented = true
};
string aplus = "A+";
string json = JsonSerializer.Serialize(aplus, options).ToString();
Console.WriteLine("{0} {1}", aplus, json);
}
It outputs
A+ "A\u002B"
When I expect
A+ "A+"
What I'm doing wrong?
I uploaded the code here https://github.com/dhilst/csharp-test3
To run on console I use this dotnet test --logger:"console;verbosity=detailed"