Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

JObject does not process in PCL of Xamarin Forms Project

$
0
0

I am writing to learn ask why during debug, in Xamarin Studio - a JObject, and other Json.Net processes, do not seem to process;

The processing gets hung up within a method of a Portable Class Library;

I am working with Xamarin Forms, and the Bing Search API - the method in question is listed @ the end of this message;

The Bing Search API query is downloaded successfully into the request - and I am attempting to iterate thru the returned Json response;

Any insight, guidance is appreciated;

public void FeedDownloaded (IAsyncResult result)
{
var request = result.AsyncState as HttpWebRequest;

        var response = request.EndGetResponse (result);

        using (var streamReader = new StreamReader(response.GetResponseStream()))
        {
            var resultNew = streamReader.ReadToEnd();

            JObject joResponse = JObject.Parse(resultNew);                   
            JObject ojObject = (JObject)joResponse["d"];
            JArray array= (JArray)ojObject ["results"];
            int id = Convert.ToInt32(array[0].ToString());
        }
    }

Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>