Package org.apache.struts2.rest.handler
Class JacksonJsonHandler
java.lang.Object
org.apache.struts2.rest.handler.JacksonJsonHandler
- All Implemented Interfaces:
- ContentTypeHandler
Handles JSON content using jackson-lib
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfromObject(ActionInvocation invocation, Object obj, String resultCode, Writer stream) Gets the content type for this handlerGets the extension this handler supportsvoidsetDefaultEncoding(String val) voidtoObject(ActionInvocation invocation, Reader in, Object target) 
- 
Constructor Details- 
JacksonJsonHandlerpublic JacksonJsonHandler()
 
- 
- 
Method Details- 
toObject- Specified by:
- toObjectin interface- ContentTypeHandler
- Throws:
- IOException
 
- 
fromObjectpublic String fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer stream) throws IOException - Specified by:
- fromObjectin interface- ContentTypeHandler
- Throws:
- IOException
 
- 
getContentTypeDescription copied from interface:ContentTypeHandlerGets the content type for this handler- Specified by:
- getContentTypein interface- ContentTypeHandler
- Returns:
- The mime type
 
- 
getExtensionDescription copied from interface:ContentTypeHandlerGets the extension this handler supports- Specified by:
- getExtensionin interface- ContentTypeHandler
- Returns:
- The extension
 
- 
setDefaultEncoding
 
-