Package org.apache.camel.jsonpath
Interface JsonPathAdapter
- All Known Implementing Classes:
JacksonJsonAdapter
public interface JsonPathAdapter
-
Method Summary
Modifier and TypeMethodDescriptionvoidinit(org.apache.camel.CamelContext camelContext) Initializes the adapterAttempt to read/convert the message body into aMaptypewriteAsString(Object value, org.apache.camel.Exchange exchange) Attempts to write the value as a JSOnStringvalue.
-
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 aMaptype- Parameters:
body- the message bodyexchange- the Camel exchange- Returns:
- converted as
Mapor null if not possible
-
writeAsString
Attempts to write the value as a JSOnStringvalue.- Parameters:
value- the valueexchange- the Camel exchange- Returns:
- written as
StringJSON or null if not possible
-