protected internal virtual object ParseJSONResponse(URLConnection conn) { object result = null; Body responseBody = conn.GetResponseBody(); if (responseBody != null) { byte[] json = responseBody.GetJson(); string jsonString = null; if (json != null) { jsonString = Sharpen.Runtime.GetStringForBytes(json); try { result = mapper.ReadValue <object>(jsonString); } catch (Exception) { Fail(); } } } return(result); }