views:

33

answers:

1

I'm having a really weird issue. I must be doing something really obvious that is wrong, but I can't see it. I'm building a wp7 app which currently runs in the emulator.

I have a URL that returns JSON. I visit this URL in my browser and verify that it works.

I get the data from this URL in Silverlight using WebClient. When I get the result, it's all the same - except one of the JSON fields is gone.

How is this possible? I'm not sure what I'm doing wrong. What could cause inconsistencies between the way JSON looks in a web browser v. a WebClient result in the wp7 emulator?

Here's the code:

            downloadData(STORIES_URL + vid,
                delegate(object sender, DownloadStringCompletedEventArgs e)
                {
                    data_StoryDownloadCompleted(sender, e, _sectionStories[vid], STORIES_URL + vid);
                });

    static void data_StoryDownloadCompleted(object sender, DownloadStringCompletedEventArgs e, ObservableCollection<Story> results, string uri)
    {
        if (e.Error != null)
        {
            throw e.Error;
        }

        JObject data = JObject.Parse(e.Result);
        // ...
    }

What could I be doing wrong?