You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2019/12/13 08:11:36 UTC

[GitHub] [camel-quarkus] jstakun opened a new issue #543: Unmarshal json in spring xml

jstakun opened a new issue #543: Unmarshal json in spring xml
URL: https://github.com/apache/camel-quarkus/issues/543
 
 
   I'm trying to migrate spring xml route to quarkus camel. Everything works except for json unmarshaling.
   
   In original version I've configured data format in camel context:
   
   ```
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
           <dataFormats>
               <json id="transform-game" library="Jackson" unmarshalTypeName="com.openshift.wildwest.models.Game"/>
               <json id="transform-platform-object" library="Jackson" unmarshalTypeName="com.openshift.wildwest.models.PlatformObject"/>
           </dataFormats>
   ```
   ...
   and the I'm calling it in the route:
   
    `<unmarshal ref="transform-game"/>`
   
   In quarkus version I don't know how to declare dataFormats beacuse in the example camel context is declared in application.properties and not in the xml hence I'm declaring it in the route:
   
   ```
   <unmarshal>
          <json library="Jackson" unmarshalTypeName="com.openshift.wildwest.models.Game" id="transform-game"/>
   </unmarshal>
   ```
   However this doesn't seem to unmarshal json body to pojo. 
   Can you advice proper syntax?
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services