[
https://issues.apache.org/jira/browse/CAMEL-27270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27270 started by Claus Ibsen.
-------------------------------------------
> camel-jackson and camel-jackson3 - application-json keeps a Json value given
> as text when the Content-Type is application/json
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27270
> URL: https://issues.apache.org/jira/browse/CAMEL-27270
> Project: Camel
> Issue Type: Improvement
> Components: camel-jackson
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Since CAMEL-26300 the {{application-json}} data type keeps text that is a
> Json object or array, and writes any other text as a Json string, also a Json
> number, boolean, {{null}} or quoted string ({{ORD-1}} becomes {{"ORD-1"}}).
> So a source that gives one Json value as text, such as the quoted string
> {{"Hello"}} of {{google-mail-source}}, gets it encoded a second time, to
> {{"\"Hello\""}}, once its Kamelet declares {{json}} as its out data type
> (applied since CAMEL-27258).
> Fix: when the {{Content-Type}} header is {{application/json}} (with or
> without parameters such as a charset), text that is exactly one Json value is
> Json already and is kept as it is. Without that header the CAMEL-26300 rule
> is unchanged, and text that is not Json (such as {{ORD-1}}) still becomes a
> Json string. Both camel-jackson and camel-jackson3.
> Part of the data types work for the Kamelet catalog (camel-kamelets#3117,
> CAMEL-25928).
> _Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)