public class JsonReadOptions extends Object
You can register JsonReadBeanVisitors to customise the processing of the beans as they are processed and handle any custom JSON elements that could not be mapped to bean properties.
| Modifier and Type | Field and Description |
|---|---|
protected Object |
objectMapper |
protected Map<String,JsonReadBeanVisitor<?>> |
visitorMap |
| Constructor and Description |
|---|
JsonReadOptions()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
JsonReadOptions |
addRootVisitor(JsonReadBeanVisitor<?> visitor)
Register a JsonReadBeanVisitor for the root level.
|
JsonReadOptions |
addVisitor(String path,
JsonReadBeanVisitor<?> visitor)
Register a JsonReadBeanVisitor for a given path.
|
Object |
getObjectMapper()
Return the Jackson ObjectMapper to use (if not wanted to use the objectMapper set on the ServerConfig).
|
Map<String,JsonReadBeanVisitor<?>> |
getVisitorMap()
Return the map of JsonReadBeanVisitor's.
|
void |
setObjectMapper(Object objectMapper)
Set the Jackson ObjectMapper to use (if not wanted to use the objectMapper set on the ServerConfig).
|
protected final Map<String,JsonReadBeanVisitor<?>> visitorMap
protected Object objectMapper
public JsonReadOptions()
public Map<String,JsonReadBeanVisitor<?>> getVisitorMap()
public JsonReadOptions addRootVisitor(JsonReadBeanVisitor<?> visitor)
public JsonReadOptions addVisitor(String path, JsonReadBeanVisitor<?> visitor)
public Object getObjectMapper()
public void setObjectMapper(Object objectMapper)
Copyright © 2015. All rights reserved.