|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.heroku.api.parser.Json
public class Json
Constructor Summary | |
---|---|
Json()
|
Method Summary | ||
---|---|---|
static
|
parse(byte[] data,
java.lang.Class<? extends Request<T>> classType)
Calls Parser.parse() using the generic type T for Request |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Json()
Method Detail |
---|
public static <T> T parse(byte[] data, java.lang.Class<? extends Request<T>> classType)
public class SampleRequest implements Request {
...
public App getResponse(byte[] data, int status) {
return Json.parse(data, getClass());
}
}
data
- JSON byte array to be parsedclassType
- The Request implementation class type. This is typically given the calling class as
an argument.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |