I am adding the IRC help I got here for future reference from fellow
googlers

[10:54] <karlkilden> Any pointers to write a reader? :)
[10:55] <rmannibucau>
https://github.com/apache/johnzon/blob/master/johnzon-jaxrs/src/main/java/org/apache/johnzon/jaxrs/DelegateProvider.java
[10:55] <rmannibucau> this is not a johnzon specific code (well it is but i
mean it is a plain jaxrs delegation sample)
[10:55] <rmannibucau> you can surely unwrap in readFrom
[10:55] <rmannibucau> that said if you modify the app i would add a wrapper
probably
[10:56] <rmannibucau> SimpleDtoWrapper { SimpleDto: {...}}
[10:56] <rmannibucau> easier to maintain/understand
[11:00] <karlkilden> rmannibucau: We tested the wrapper strategy because we
like johnzon and it works, thanks!


On 23 September 2016 at 10:51, Romain Manni-Bucau <[email protected]>
wrote:

> Hi
>
> 2016-09-23 10:33 GMT+02:00 Karl Kildén <[email protected]>:
>
> > Hi!
> >
> > Using TomEE 7.x our rest endpoints now expect:
> >
> > {
> >         "name":"Name",
> >         "occupation":"RestProblemSolver"
> > }
> >
> >
> > But our partner sends
> >
> >
> > {
> >     "simpleDTO": {
> >         "name":"Name",
> >         "occupation":"RestProblemSolver"
> >  }
> >
> > Can I configure johnzon so it expects the DTO root name like this? Or
> must
> > configure to use jettison?
> >
> >
> Johnzon doesnt support that to stay aligned on jsonb so either you wrap
> your payload on the server (or unwrap it in a reader) or you can configure
> jettison
>
>
> > Cheers
> >
>

Reply via email to