在字符串变量中捕获 Http 响应。我想将字符串转换为 json。如何转换?
string responseData;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
if (response.StatusCode == HttpStatusCode.OK)
{
System.IO.StreamReader responseReader = new System.IO.StreamReader(request.GetResponse().GetResponseStream());
responseData = responseReader.ReadToEnd();
}