public class JacksonHelper
extends java.lang.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 java.lang.String |
DEFAULT_FILTER_NAME |
Constructor and Description |
---|
JacksonHelper() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
java.lang.Object |
construct(java.io.Reader content,
java.lang.Class requiredType)
Constructs the object based on the content.
|
java.util.List |
constructList(java.io.Reader content,
java.lang.Class 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(org.codehaus.jackson.map.Module module)
Sets the Jackson Module to be used.
|
void |
withWriter(java.io.OutputStream outStream,
JacksonHelper.Writer writer)
A callback so a JsonGenerator can be used inline but exception are handled here
|
public static final java.lang.String DEFAULT_FILTER_NAME
public void setModule(org.codehaus.jackson.map.Module module)
module
- public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public void withWriter(java.io.OutputStream outStream, JacksonHelper.Writer writer) throws java.io.IOException
outStream
- writer
- The writer interfacejava.io.IOException
public java.lang.Object construct(java.io.Reader content, java.lang.Class requiredType) throws java.io.IOException, org.codehaus.jackson.map.JsonMappingException, org.codehaus.jackson.JsonParseException
content
- requiredType
- java.io.IOException
org.codehaus.jackson.map.JsonMappingException
org.codehaus.jackson.JsonParseException
public java.util.List constructList(java.io.Reader content, java.lang.Class requiredType) throws java.io.IOException, org.codehaus.jackson.map.JsonMappingException, org.codehaus.jackson.JsonParseException
content
- requiredType
- java.io.IOException
org.codehaus.jackson.map.JsonMappingException
org.codehaus.jackson.JsonParseException
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.