- How to pick the value of "estimatedResultCount" from json data
- I tried this code and getting but its not the right way
- How to get a particular node value from json data
-
I dont know how to get the value using json
string link = txtweb.Text.Trim(); string strurl = "http://ift.tt/1RnGYOS:" + link; StreamReader stream = objm.URLServerRequest(strurl); string myResponse = stream.ReadToEnd(); // var stuff = JsonConvert.DeserializeObject(myResponse); // string backlinks = stuff.responseData.cursor.estimatedResultCount; string output = myResponse.Substring(myResponse.IndexOf(@"estimatedResultCount") + @"/**".Length); string str = output.Remove(0, 20); string value1 = str.Substring(0, str.IndexOf(",") + 1); //str = str.Remove(str.IndexOf(',')); string value3 = value1.Remove(value1.Length - 2);
}
json data
{
"responseData":{
"results":[
{
"GsearchResultClass":"GwebSearch",
"unescapedUrl":"http://ift.tt/1QvZByu",
"url":"http://ift.tt/1QvZByu",
"visibleUrl":"www.homeocare.in",
"cacheUrl":"http://ift.tt/1xLj0zV
\u003dcache:E7xF9dtFWgIJ:www.homeocare.in",
"title":"Homeopathy Clinics in Hyderabad
- Homeopathy Treatment",
"titleNoFormatting":"Homeopathy Clinics
in Hyderabad - Homeopathy Treatment",
"content":"Homeocare International -
World Class Homeopathy Clinic in India provides
\ninformation on causes, symptoms, and Homeopathy
treatment of various \ndiseases."
},
{
"GsearchResultClass":"GwebSearch",
"unescapedUrl":"http://ift.tt/1RnH1dp
l",
"url":"http://ift.tt/1QvZDX9",
"visibleUrl":"www.homeocare.in",
"cacheUrl":"http://ift.tt/1xLj0zV
\u003dcache:zrjNDKonZY0J:www.homeocare.in",
"title":"Homeocare International |
Contact Us",
"titleNoFormatting":"Homeocare
International | Contact Us",
"content":"To get best Homeopathy
treatment Contact Homeocare International through
\nphone or fill contact form. We have branches all
over South India."
},
{
"GsearchResultClass":"GwebSearch",
"unescapedUrl":"http://ift.tt/1RnGZ56.
html",
"url":"http://ift.tt/1QvZByx",
"visibleUrl":"www.homeocare.in",
"cacheUrl":"http://ift.tt/1xLj0zV
\u003dcache:oPJKzW6sHOkJ:www.homeocare.in",
"title":"Homeocare International Reviews
/ Testimonials",
"titleNoFormatting":"Homeocare
International Reviews / Testimonials",
"content":"Homeocare International
Reviews / Testimonials for Happy Patient. We pride
\nourselves on excellent service, and our reviews
show it!"
},
{
"GsearchResultClass":"GwebSearch",
"unescapedUrl":"http://ift.tt/1RnGZ5a
l",
"url":"http://ift.tt/1QvZByC",
"visibleUrl":"www.homeocare.in",
"cacheUrl":"http://ift.tt/1xLj0zV
\u003dcache:gqHnM_Tg0hcJ:www.homeocare.in",
"title":"Homeopathy Treatment for
Arthritis | Arthritis Treatment",
"titleNoFormatting":"Homeopathy Treatment
for Arthritis | Arthritis Treatment",
"content":"Get Homeopathy Treatment for
arthritis and rheumatoid arthritis at Homeocare
\nInternational provides safe and effective remedies
with no side effects."
}
],
"cursor":{
"resultCount":"176",
"pages":[
{
"start":"0",
"label":1
},
{
"start":"4",
"label":2
},
{
"start":"8",
"label":3
},
{
"start":"12",
"label":4
},
{
"start":"16",
"label":5
},
{
"start":"20",
"label":6
},
{
"start":"24",
"label":7
},
{
"start":"28",
"label":8
}
],
"estimatedResultCount":"176",
"currentPageIndex":0,
"moreResultsUrl":"http://ift.tt/1RnH1dr
\u003dutf8\u0026ie\u003dutf8\u0026source\u003duds
\u0026start\u003d0\u0026hl\u003den\u0026q
\u003dsite:www.homeocare.in",
"searchResultTime":"0.23"
}
},
"responseDetails":null,
"responseStatus":200
}
Aucun commentaire:
Enregistrer un commentaire