You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2024/03/03 07:54:00 UTC

[jira] [Updated] (CAMEL-20495) camel-jsonpath - ResultType List should store single element into a List so it can be used afterwards with Split EIP

     [ https://issues.apache.org/jira/browse/CAMEL-20495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-20495:
--------------------------------
    Component/s: camel-jsonpath
                     (was: came-core)

> camel-jsonpath - ResultType List should store single element into a List so it can be used afterwards with Split EIP
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-20495
>                 URL: https://issues.apache.org/jira/browse/CAMEL-20495
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jsonpath
>            Reporter: Rhuan Rocha
>            Priority: Major
>             Fix For: 3.21.5, 3.22.2, 4.4.1, 4.5.0, 4.0.5
>
>
> We are supporting the Split EIP splitting a map out of the box from Camel 3.13.0 https://issues.apache.org/jira/browse/CAMEL-17101. However, it changes the behavior when using jsonpath, as the jsonpath always evaluates the message to Map.
> {code:java}
> // code placeholder
> from("direct:start")
>         .split().jsonpath("$.store.books")
>         .to("log:book", "mock:result"); {code}
> My suggestion is to allow enable and disable this behavior. Look at this example
> {code:java}
> // code placeholder
> from("direct:start")
>         .split()
>         .splitMapEntry(true)
>         .jsonpath("$.store.books")
>         .to("log:book", "mock:result"); {code}
>  
> Let me know if it makes sense. If so, I can get this issue and send a PR. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)