[
https://issues.apache.org/jira/browse/CAMEL-7619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14070505#comment-14070505
]
Claus Ibsen commented on CAMEL-7619:
------------------------------------
Got the first prototype that can map json/xml to a pojo using the rest dsl
defined as
{code}
// use the rest DSL to define the rest services
rest("/users/")
.post("new").as(UserPojo.class)
.to("mock:input");
{code}
Notice the "as" in the route. May come up with a better name.
The current code checks the content-type and message body to see if its json or
xml and maps accordingly using jackson. Though we may allow users to configure
this behavior so they can control if it should always be json only or xml only
etc.
> Rest DSL - Add support for json/xml bindings
> --------------------------------------------
>
> Key: CAMEL-7619
> URL: https://issues.apache.org/jira/browse/CAMEL-7619
> Project: Camel
> Issue Type: Sub-task
> Components: camel-core
> Affects Versions: 2.14.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 2.14.0
>
>
> see parent ticket
> So we can plugin json bindings such as jackson etc.
> And for xml, we can plugin jaxb etc.
--
This message was sent by Atlassian JIRA
(v6.2#6252)