public class JsonPropertyAccessor extends Object implements PropertyAccessor
PropertyAccessor
that knows how to read on Jackson JSON objects.Modifier and Type | Class and Description |
---|---|
static class |
JsonPropertyAccessor.ArrayNodeAsList
|
static class |
JsonPropertyAccessor.ToStringFriendlyJsonNode
A
JsonPropertyAccessor.WrappedJsonNode implementation to represent JsonNode as string. |
static interface |
JsonPropertyAccessor.WrappedJsonNode
The base interface for wrapped
JsonNode . |
Constructor and Description |
---|
JsonPropertyAccessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(EvaluationContext context,
Object target,
String name) |
boolean |
canWrite(EvaluationContext context,
Object target,
String name) |
Class<?>[] |
getSpecificTargetClasses() |
TypedValue |
read(EvaluationContext context,
Object target,
String name) |
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
static JsonPropertyAccessor.WrappedJsonNode |
wrap(com.fasterxml.jackson.databind.JsonNode json) |
void |
write(EvaluationContext context,
Object target,
String name,
Object newValue) |
public Class<?>[] getSpecificTargetClasses()
getSpecificTargetClasses
in interface PropertyAccessor
public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException
canRead
in interface PropertyAccessor
AccessException
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException
read
in interface PropertyAccessor
AccessException
public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException
canWrite
in interface PropertyAccessor
AccessException
public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException
write
in interface PropertyAccessor
AccessException
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public static JsonPropertyAccessor.WrappedJsonNode wrap(com.fasterxml.jackson.databind.JsonNode json)