public abstract class JsonHttpSerializer extends HttpObjectSerializer
HttpObjectSerializer.SerializerException| Constructor and Description |
|---|
JsonHttpSerializer() |
| Modifier and Type | Method and Description |
|---|---|
String |
getCharset()
Returns the charset used by this serializer.
|
String |
getContentType()
Returns the content-type used by this serializer.
|
<T> List<T> |
getJsonList(javax.servlet.http.HttpServletRequest req,
Class<T> elementClass)
Returns a list of objects from given request.
|
abstract <T> List<T> |
getJsonList(InputStream json,
String charset,
Class<T> elementType) |
String |
toJson(Object obj) |
readObject, readObject, toString, writeObjectpublic abstract <T> List<T> getJsonList(InputStream json, String charset, Class<T> elementType) throws IOException, HttpObjectSerializer.SerializerException
public String getContentType()
HttpObjectSerializergetContentType in class HttpObjectSerializerpublic String getCharset()
HttpObjectSerializergetCharset in class HttpObjectSerializerpublic final <T> List<T> getJsonList(javax.servlet.http.HttpServletRequest req, Class<T> elementClass) throws BadRequestException, IOException
T - Type of list elements.req - HTTP requestelementClass - class of list elementsBadRequestException - if it was not possible to retrieve a list of objects from given request.IOException - if an error happened during the operationCopyright © 2016 Agapsys Tecnologia Ltda-ME. All rights reserved.