Question

Below is my Json

{"caseType":"CashLess","claimNo":9.0}

how to get caseType value in logger. below my config XML

<json:json-to-object-transformer doc:name="JSON to Object"/>
<logger message="#['\n JSON::\n'+ message.payload.caseType+'\n']" level="INFO" doc:name="Logger"/>

but it is giving error.
Thanks.

Was it helpful?

Solution

need to add returnClass="java.util.HashMap" in json:json-to-object-transformer

<json:json-to-object-transformer doc:name="JSON to Object" returnClass="java.util.HashMap"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top