Json数据处理方法

protected string GetJson(string url)
{
WebClient wc = new WebClient();
wc.Credentials = CredentialCache.DefaultCredentials;
wc.Encoding = Encoding.UTF8;
string returnText = wc.DownloadString(url);
if (returnText.Contains("errcode"))
{
//可能发生错误
}
//Response.Write(returnText);
return returnText;
}

posted @ 2015-08-04 14:32  皮皮木有小JJ  阅读(211)  评论(0编辑  收藏  举报