I'm trying to download a .json file from the following url to use the player names elsewhere:
It is a list of football players.
Some of the football players have accents in their names like Ibrahimović.
string eaplay = "https://fifa17.content.easports.com/fifa/fltOnlineAssets/CC8267B6-0817-4842-BB6A-A20F88B05418/2017/fut/items/web/players.json";
string eaResult = wb.DownloadString(eaplay);
JObject jo = JObject.Parse(eaResult);
string playerName = jo["Players"][10]["l"].ToString();
10 is NOT the index in which last name of ibrahimovic resides but this is an example.
I use playerName
to then add to a class which I will then write to a .json file, however the player Ibrahimović is now stored as Ibrahimović.
I wouldn't mind being able to load them so Ibrahimović would be Ibrahimovic but even with the accent would be great.
I've tried serialising players.json using string options EscapeNonASCII with no avail. When I download the players.json and open it in Notepad++ the accents are encoded correctly.