T
- The type that this parser deserializes toP
- The type of the “parse object” which describes how to parse the requestpublic interface Parser<T,P extends Parse<T>>
The ParserSupport
class is a convenient base for implementations.
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
The content type that this parser knows how to deserialize.
|
Class<T> |
getParsedType()
The type that this parser can deserialize to.
|
Class<P> |
getParseType()
The type of the
Parse object for this parser. |
T |
parse(Context context,
RequestBody requestBody,
P parse)
Deserializes the request body of the context into an object.
|
String getContentType()
Class<P> getParseType()
Parse
object for this parser.Parse
object for this parser.Class<T> getParsedType()
T parse(Context context, RequestBody requestBody, P parse)
context
- The context to deserializerequestBody
- The request body to deserializeparse
- The description of how to parse the request body