[
https://issues.apache.org/jira/browse/CAMEL-22062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-22062.
---------------------------------
Resolution: Fixed
Thanks for reporting and the PR
> camel-jsonata: outputType: Jackson does not output Jackson body
> ---------------------------------------------------------------
>
> Key: CAMEL-22062
> URL: https://issues.apache.org/jira/browse/CAMEL-22062
> Project: Camel
> Issue Type: Bug
> Affects Versions: 4.4.5, 4.8.3, 4.10.4
> Reporter: Luis Sergio Faria Carneiro
> Priority: Minor
> Fix For: 4.8.8, 4.10.5, 4.12.0
>
>
> Consider the following integration code:
> {code:java}
> - from:
> uri: rest:get:/demo
> steps:
> - to:
> uri: "jsonata:transform.jsonata"
> parameters:
> inputType: Jackson
> outputType: Jackson
> - setBody:
> simple: "Body class is ${body.class}"
> {code}
> the contents of transform.jsonata are irrelevant. Let's just say it is:
> {code:json}
> {
> "hello": "world"
> }
> {code}
> Start this integration using jbang with Apache Camel 4.10.4:
> {code:java}
> jbang -Dcamel.jbang.version=4.10.4 camel@apache/camel run transform.jsonata
> integration.yaml
> {code}
> Submit a GET to [http://localhost:8080/demo] and check that the result is:
> {code:java}
> Body class is class java.util.LinkedHashMap
> {code}
> which is not a Jackson class.
> The same happened with Camel 4.8.x and 4.4.x.
> With Camel 4.0.4 I got a different result, though:
> {code:java}
> Body class is class com.fasterxml.jackson.databind.node.ObjectNode
> {code}
> which is a Jackson class.
> I assume this is a bug because it's a breaking change and also because the
> outputType parameter says the output should be Jackson.
> This was most likely caused by
> https://issues.apache.org/jira/browse/CAMEL-20298.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)