internal virtual object ParseJSONResponse(HttpURLConnection conn)
{
Object result = null;
var stream = conn.GetOutputStream();
var bytesRead = 0L;
const Int32 chunkSize = 8192;
var bytes = stream.ReadAllBytes();
var responseBody = new Body(bytes);
if (responseBody != null)
{
var json = responseBody.GetJson();
String jsonString = null;
if (json != null)
{
jsonString = Runtime.GetStringForBytes(json);
try
{
result = mapper.ReadValue<object>(jsonString);
}
catch (Exception)
{
Assert.Fail();
}
}
}
return result;
}