string s =
"{\"SubmitMadLabResult\":\"[{\\\"code\\\":\\\"1\\\",\\\"errorCode\\\":\\\"\\\",\\\"Message\\\":\\\"Success\\\",\\\"bStatus\\\":\\\"true\\\"}]\"}";
i have get json responce of a web service like above . how to parse this type of json.
code;-
httpRequest.ContentType = "application/json";
httpRequest.Method = "POST";
byte[] bytes = Encoding.UTF8.GetBytes(inputJson);
using (Stream stream = httpRequest.GetRequestStream())
{
stream.Write(bytes, 0, bytes.Length);
stream.Close();
}
string result = string.Empty;
HttpWebResponse response = null;
using (HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse())
{
using (Stream stream = httpResponse.GetResponseStream())
{
string StatusCode = httpResponse.StatusCode.ToString();
result = (new StreamReader(stream)).ReadToEnd();
// result= "{\"SubmitMadLabResult\":\"[{\\\"code\\\":\\\"1\\\",\\\"errorCode\\\":\\\"\\\",\\\"Message\\\":\\\"Success\\\",\\\"bStatus\\\":\\\"true\\\"}]\"}"
response = (HttpWebResponse)httpRequest.GetResponse();
}
}
Hardik DeshaniRank #881 · 2.5K reputationPosted May 18, 2019, 3:45 AM EDT
Catcher WongRank #286 · 8.8K reputationPosted May 18, 2019, 6:21 PM EDT
Posted May 21, 2019, 8:07 PM EDT
ankit chourasia95 reputationPosted May 21, 2019, 8:40 PM EDT
Posted Jun 2, 2019, 6:47 PM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Jun 2, 2019, 7:23 PM EDT
Gajendra JangidRank #157 · 14.9K reputationPosted Jun 2, 2019, 8:14 PM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 21, 2019, 7:00 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts