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)
typeKey
- public Object readFrom(Resource resource, ClassLoader classLoader) throws Exception
readFrom
in interface ResourceReader
Exception
Copyright © 2012. All Rights Reserved.