public class JacksonJsonAdapter extends Object implements JsonPathAdapter
JsonPathAdapter which is using Jackson to convert the message
body to Map. This allows us to support POJO classes with camel-jsonpath.| Constructor and Description |
|---|
JacksonJsonAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(org.apache.camel.CamelContext camelContext)
Initializes the adapter
|
Map |
readValue(Object body,
org.apache.camel.Exchange exchange)
Attempt to read/convert the message body into a
Map type |
String |
writeAsString(Object value,
org.apache.camel.Exchange exchange)
Attempts to write the value as a JSOn
String value. |
public void init(org.apache.camel.CamelContext camelContext)
JsonPathAdapterinit in interface JsonPathAdaptercamelContext - the CamelContextpublic Map readValue(Object body, org.apache.camel.Exchange exchange)
JsonPathAdapterMap typereadValue in interface JsonPathAdapterbody - the message bodyexchange - the Camel exchangeMap or null if not possiblepublic String writeAsString(Object value, org.apache.camel.Exchange exchange)
JsonPathAdapterString value.writeAsString in interface JsonPathAdaptervalue - the valueexchange - the Camel exchangeString JSon or null if not possibleApache Camel