public class JacksonHelper extends Object implements org.springframework.beans.factory.InitializingBean
| Modifier and Type | Class and Description |
|---|---|
static class |
JacksonHelper.ReturnAllBeanProperties |
static interface |
JacksonHelper.Writer
A callback interface for use with the withWriter() method
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FILTER_NAME |
| Constructor and Description |
|---|
JacksonHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
<T> T |
construct(Reader content,
Class<T> requiredType)
Constructs the object based on the content.
|
<T> List<T> |
constructList(Reader content,
Class<T> requiredType)
Constructs the object based on the content as a List, the JSON can be an array or just a single value without the [] symbols
|
void |
setModule(com.fasterxml.jackson.databind.Module module)
Sets the Jackson Module to be used.
|
void |
withWriter(OutputStream outStream,
JacksonHelper.Writer writer)
A callback so a JsonGenerator can be used inline but exception are handled here
|
public static final String DEFAULT_FILTER_NAME
public void setModule(com.fasterxml.jackson.databind.Module module)
module - Modulepublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void withWriter(OutputStream outStream, JacksonHelper.Writer writer) throws IOException
outStream - OutputStreamwriter - The writer interfaceIOExceptionpublic <T> T construct(Reader content, Class<T> requiredType)
content - ReaderCopyright © 2005–2018 Alfresco Software. All rights reserved.