public static APIData Parse(this CachedSession oSession) { svdata _svdata = null; var reader = new StringReader(oSession.JsonResponse); using (var jreader = new JsonTextReader(reader)) _svdata = JSerializer.Deserialize <svdata>(jreader); return(new APIData(_svdata, oSession.Request)); }
public static bool TryParse <T>(this CachedSession oSession, out APIData <T> result) { try { result = oSession.Parse <T>(); return(result.IsSuccess); } catch { result = null; return(false); } }
public static APIData <T> Parse <T>(this CachedSession oSession) { var reader = new StringReader(oSession.JsonResponse); return(new APIData <T>(Parse <T>(reader), oSession.Request)); }