Package org.apache.camel.jsonpath
Interface JsonPathAdapter
- All Known Implementing Classes:
JacksonJsonAdapter
public interface JsonPathAdapter
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(org.apache.camel.CamelContext camelContext) Initializes the adapterAttempt to read/convert the message body into aMap
typewriteAsString
(Object value, org.apache.camel.Exchange exchange) Attempts to write the value as a JSOnString
value.
-
Method Details
-
init
void init(org.apache.camel.CamelContext camelContext) Initializes the adapter- Parameters:
camelContext
- the CamelContext
-
readValue
Attempt to read/convert the message body into aMap
type- Parameters:
body
- the message bodyexchange
- the Camel exchange- Returns:
- converted as
Map
or null if not possible
-
writeAsString
Attempts to write the value as a JSOnString
value.- Parameters:
value
- the valueexchange
- the Camel exchange- Returns:
- written as
String
JSON or null if not possible
-