Class JsonPropertyAccessor
java.lang.Object
org.springframework.integration.json.JsonPropertyAccessor
- All Implemented Interfaces:
- PropertyAccessor
A SpEL 
PropertyAccessor that knows how to read properties from JSON objects.
 Uses Jackson JsonNode API for nested properties access.- Since:
- 3.0
- Author:
- Eric Bottard, Artem Bilan, Paul Martin, Gary Russell, Pierre Lakreb, Vladislav Fefelov
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanRead(EvaluationContext context, Object target, String name) booleancanWrite(EvaluationContext context, Object target, String name) Class<?>[]read(EvaluationContext context, Object target, String name) voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) static Objectwrap(com.fasterxml.jackson.databind.JsonNode json) voidwrite(EvaluationContext context, Object target, String name, Object newValue) 
- 
Constructor Details- 
JsonPropertyAccessorpublic JsonPropertyAccessor()
 
- 
- 
Method Details- 
setObjectMapperpublic void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) 
- 
getSpecificTargetClasses- Specified by:
- getSpecificTargetClassesin interface- PropertyAccessor
 
- 
canReadpublic boolean canRead(EvaluationContext context, Object target, String name) throws AccessException - Specified by:
- canReadin interface- PropertyAccessor
- Throws:
- AccessException
 
- 
readpublic TypedValue read(EvaluationContext context, @Nullable Object target, String name) throws AccessException - Specified by:
- readin interface- PropertyAccessor
- Throws:
- AccessException
 
- 
canWrite- Specified by:
- canWritein interface- PropertyAccessor
 
- 
write- Specified by:
- writein interface- PropertyAccessor
 
- 
wrap- Throws:
- AccessException
 
 
-