Hi,
i just saw the super() and MyObjectMapperProvider() (this won't compile
anyway, right;-)
calls and wanted to make sure you understand, you can not have more than
one ContextResolver<ObjectMapper> classes defined in your application,
as more than one such resolvers would introduce an ambiguity.
~Jakub
On 05/31/2011 11:47 AM, Maxrunner wrote:
> Thanks jakub, its working fine now :). Still i didnt understand the second
> correction you made to my contextresolver:
>
> "@Provider
> public class JacksonObjectMapperProvider implements
> ContextResolver<ObjectMapper>{
>
> private ObjectMapper defaultObjectMapper;
> private ObjectMapper listsObjectMapper;
>
>
> public JacksonObjectMapperProvider() {
> super();
> MyObjectMapperProvider();
> }
>
> I do not know what the above means. Please note, that you should register
> just one ContextResolver<ObjectMapper> instance, as Jackson will use only
> the first one
> if more that one such provider is found. To create different object mappers,
> you should
> use the getContext method bellow."
>
> Didnt understand this correction, can you elaborate?
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/how-to-rename-XmlRootElement-in-JSON-tp6173292p6422046.html
> Sent from the Jersey mailing list archive at Nabble.com.
>