camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vitalii Tymchyshyn <...@tym.im>
Subject Re: Jackson annotations ignored
Date Sun, 14 Aug 2016 22:49:33 GMT
Are you sure it's proper Jackson version? Jackson vs Jackson2 have
different packages, but same annotation names.

Best regards, Vitalii Tymchyshyn

Нд, 14 серп. 2016 12:30 користувач cedr.f <cedric.falletta@lampiris.be>
пише:

> Hello,
>
> I'm using camel 2.16.3 in karaf 4.0.3, and there is a strange behaviour
> when
> camel marshals my object into json with jackson.
> All my annotations (@JsonIgnore, @JsonAnyGetter, ...) are ignored when
> running through camel/karaf.
> However, if i run a simple unit test with the same dependencies and try to
> marshal my object to json with ObjectMapper, the output is ok ! I'm quite
> sure though that they use the same library (fasterxml 2.6.3) as i go
> through
> the same classes when debugging both the unit test and my program.
>
> Any idea how this could be ? My camel config is really straight-forward,
> nothing fancy here...
>
> restConfiguration()
>                 .bindingMode(RestBindingMode.json)
>
> This doesn't help either :
> .marshal().json(JsonLibrary.Jackson)
>
> The json is ok but it doesn't introspect my annotations.
>
> Kind Regards,
> Cédric.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Jackson-annotations-ignored-tp5786355.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message