JSON Help, please

Hello, I am in need of some info. I am grabbing some data from wikipedia and I don't know how to parse it. The code is as follows:

string sURL = "http://ift.tt/1QZr8I2; using (WebClient client = new WebClient()) { string json = client.DownloadString(sURL); } 

Which returns the data below… but I am ignorant of JSON so… help.

{"batchcomplete":"","query":{"geosearch":[ {"pageid":21246287,"ns":0,"title":"105th Street (IRT Second Avenue Line)","lat":40.789944444444,"lon":-73.942922222222,"dist":253.4,"primary":""},

{"pageid":19002747,"ns":0,"title":"St. Cecilia's Church and Convent (New York City)","lat":40.792222222222,"lon":- 73.947222222222,"dist":280,"primary":""},

{"pageid":10546222,"ns":0,"title":"Cristo Rey New York High School","lat":40.7925,"lon":-73.947222222222,"dist":283.2,"primary":""},

{"pageid":728981,"ns":0,"title":"110th Street (IRT Lexington Avenue Line)","lat":40.794773,"lon":-73.944426,"dist":300.5,"primary":""},

{"pageid":30231882,"ns":0,"title":"St. Ann's Spanish Church (Manhattan)","lat":40.792791666667,"lon":-73.940016666667,"dist":335.8,"primary":""},

{"pageid":21246280,"ns":0,"title":"111th Street (IRT Second Avenue Line)","lat":40.793811111111,"lon":-73.940097222222,"dist":372.4,"primary":""},

{"pageid":728969,"ns":0,"title":"103rd Street (IRT Lexington Avenue Line)","lat":40.79029,"lon":-73.947687,"dist":377,"primary":""},

{"pageid":3972010,"ns":0,"title":"Lexington Avenue explosion","lat":40.790151,"lon":-73.947934,"dist":402.9,"primary":""},

{"pageid":26001133,"ns":0,"title":"St. Lucy's Church (Manhattan)","lat":40.788536111111,"lon":-73.941858333333,"dist":432,"primary":""},

{"pageid":41637484,"ns":0,"title":"Duffy's Hill","lat":40.789705,"lon":-73.948163,"dist":446.9,"primary":""}]}}

by JamesWjRose via /r/csharp

Leave a Reply