将 JSON 从 unicode 转换为原始格式

我有一个来自 webservive 的 JSON 字符串结果(波斯语)。


但是web服务的结果是这样的:


“\u0622\u062f\u0631\u0633\u0627\u06cc\u0645\u06cc\u0644”


而原文是这样的:


عملیات انجام شد


如何从unicode转换为原始格式C#


这是我的代码


HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://webserver.com/");


request.Method = "GET";

request.ContentLength = 0;

request.Credentials = CredentialCache.DefaultCredentials;

request.ContentType = "application/xml";

request.Accept = "application/xml";


using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())

{

    using (Stream receiveStream = response.GetResponseStream())

    {

        using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))

        {

            string strContent = readStream.ReadToEnd();


        }

    }

}


catspeake
浏览 226回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP