public static <T> T parse(byte[] data, Class<? extends Request<T>> classType) {
        Type[] types = doResolveTypeArguments(classType, classType, Request.class);
        if (types == null || types.length == 0) {
            throw new ParseException("Request<T> was not found for " + classType);
        }
        Type type = types[0];
        try {
            return Holder.parser.parse(data, type);
        } catch (RuntimeException e) {
            String json = HttpUtil.getUTF8String(data);
            throw new ParseException("Failed to parse JSON:" + json, e);
        }
    }
public static < T > T parse ( byte [ ] data , Class < ? extends Request < T > > classType ) { Type [ ] types = doResolveTypeArguments ( classType , classType , Request . class ) ; if ( types == null || types . length == 0 ) { throw new ParseException ( "Request<T> was not found for " + classType ) ; } Type type = types [ 0 ] ; try { return Holder . parser . parse ( data , type ) ; } catch ( RuntimeException e ) { String json = HttpUtil . getUTF8String ( data ) ; throw new ParseException ( "Failed to parse JSON:" + json , e ) ; } }
<p>
Calls Parser.parse() using the generic type T for Request given Request is the interface for the
classType parameter. If it can't find an appropriate type, it errors out with a ParseException.
</p>
<p>
The following code sample illustrates typical usage in the context of a request to Heroku's API.
The byte array is provided from a connection.execute(request) call, which is a JSON response from
the server. getClass() provides the classType, which in this case extends Request. The return
value from the parse method will be App.
</p>

@param data      JSON byte array to be parsed
@param <T> Deserialzed object type
@param classType The Request implementation class type. This is typically given the calling class as
an argument.
@return object representing the data