Click here to Skip to main content
15,905,776 members

Comments by Chakri P (Top 1 by date)

Chakri P 31-Oct-13 0:59am View    
Hi, see this below link;

https://maps.google.com/?q=area&output=json&near=ameerpet&radius=1

By using this link i am getting my output as JSON file.

But i don't want to download that file. Just i want to make a call to that link from my C# Code and i need to seperate my address block from that and i need to display that in my ASP Listbox or grid View Control.

By using that link i have tried converting JSON data to string or an array variable with C# code. My Code is like as,



var address = String.Format("https://maps.google.com/?q=area&output=json&near=ameerpet&radius=1");

var result = new System.Net.WebClient().DownloadString(address);

JavaScriptSerializer jss = new JavaScriptSerializer();

Object a = jss.DeserializeObject(result);



I am getting my result JSON data in "result" variable. But at the time of deserialization, i am getting an error.

I was struct at this area.

Can any one please help me by providing code to convert a JSON data to a string or an array format using C# Coding. As i need to display that data in ASP Listbox.

Thanks in Advance.