As an Android developer exploring the world of Windows Phone for the first time, I came across this resource on how to handle list boxes in Windows Phone 7/8. However, my challenge now is parsing JSON from a URL instead of XML as shown in the example. While the provided code snippet was helpful for working with XML asynchronously in a list box, I am looking to achieve the same functionality but with JSON data.
Below is the portion of code I used to retrieve data from a URL:
private void FlickrSearch_Click(object sender, RoutedEventArgs e)
{
WebClient webclient = new WebClient();
webclient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webclient_DownloadStringCompleted);
webclient.DownloadStringAsync(new Uri("http://api.flickr.com/services/feeds/photos_public.gne?tag=" + SearchBox.Text + "&format=rss2")); // Flickr search
}
If anyone could provide guidance on handling JSON from a URL in a Windows Phone application, it would be greatly appreciated.