[Test]
public void Test_Unicode_CandidateNames()
{
var candidateName = new Language("Raúl", "en");
var candidate = new Candidate(
"candidate-1",
new InternationalizedText(new[] { candidateName }),
string.Empty,
string.Empty,
false);
List<Candidate> candidates = new List<Candidate>
{
candidate
};
var result = new Manifest(
"test-manifest",
ElectionType.general,
DateTime.Now,
DateTime.Now,
new GeopoliticalUnit[] { },
new Party[] { },
candidates.ToArray(),
new ContestDescription[] { },
new BallotStyle[] { },
new InternationalizedText(new Language[] { }),
new ContactInformation("na"));
var json = result.ToJson();
Assert.IsTrue(json.Contains("\"value\":\"Ra\\u00fal\""));
}
Is there an existing issue for this?
Current Behavior
.ToJson() converts
úto\\u00fExpected Behavior
.ToJson() should convert
úto\u00fSteps To Reproduce
The following test should pass:
Environment
- OS:Anything else?
No response