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());
}
}