Megrez7 Megrez7 -4 years ago 184
ASP.NET (C#) Question

Convert HTML / Java encoded diactric signs from JSON message

I receive form API a JSON message which looks like:
{"message":"Nieprawid\u0142owy format"}

"\u0142" is polish charakter "ł". How can I convert the whole JSON message, as it may contain much more signs encoded this way? I have tried HTMLDecode, URLDecode and few others but none worked.

I try do to this with c# and Thanks for any ideas.

Answer Source

A JSON parser will take care of the conversion:

var json = (JObject)JsonConvert.DeserializeObject(str);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download