public class JacksonResourceReader extends Object implements ResourceReader
ResourceReader
using Jackson to read JSON into objects.ResourceReader.Type
Constructor and Description |
---|
JacksonResourceReader()
Creates a new
JacksonResourceReader . |
JacksonResourceReader(org.codehaus.jackson.map.ObjectMapper mapper)
Creates a new
JacksonResourceReader using the given ObjectMapper . |
Modifier and Type | Method and Description |
---|---|
Object |
readFrom(Resource resource,
ClassLoader classLoader) |
void |
setTypeKey(String typeKey)
Configures the JSON document's key to lookup the type to instantiate the object.
|
public JacksonResourceReader()
JacksonResourceReader
.public JacksonResourceReader(org.codehaus.jackson.map.ObjectMapper mapper)
JacksonResourceReader
using the given ObjectMapper
.mapper
- public void setTypeKey(String typeKey)
DEFAULT_TYPE_KEY
.typeKey
- public Object readFrom(Resource resource, ClassLoader classLoader) throws Exception
readFrom
in interface ResourceReader
Exception
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.