Hello, i have a very simple question I can't seem to get my head around.
I have a properly encoded UTF8-String I parse into a JObject with Json.NET, fiddle around with some values and write it to the commandline, keeping the encoded characters intact.
Everything works great except for the keeping the encoded characters intact part.
Code:
var json = "{roster: [[\"Tulg\u00f4r\", 990, 1055]]}";
var j = JObject.Parse(json);
for (int i = 0; i < j["roster"].Count(); i++)
{
j["roster"][i][1] = ((int)j["roster"][i][1]) * 3;
j["roster"][i][2] = ((int)j["roster"][i][2]) * 3;
}
Console.WriteLine(JsonConvert.SerializeObject(j, Formatting.None));
Actual Output:
{"roster":[["Tulgôr",2970,3165]]}
Desired Output:
{"roster":[["Tulg\u00f4r",2970,3165]]}
It seems like my phrasing in Google is inappropriate since nothing useful came up. I'm sure it's something uber-easy and i will feel pretty stupid afterwards. :)