You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2013/07/13 22:13:54 UTC

[jira] [Closed] (WINK-299) Make Jackson the default JSON provider for Wink

     [ https://issues.apache.org/jira/browse/WINK-299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek closed WINK-299.
---------------------------------

    
> Make Jackson the default JSON provider for Wink
> -----------------------------------------------
>
>                 Key: WINK-299
>                 URL: https://issues.apache.org/jira/browse/WINK-299
>             Project: Wink
>          Issue Type: Improvement
>          Components: Providers
>            Reporter: Jason Dillon
>            Assignee: Jesse Ramos
>             Fix For: 1.1.2
>
>
> Jackson seems to be the only JSON provider that works well (the other ones work in limited situations, but Jackson seems to handle it all well).  So IMO Jackson should be considered as the default JSON provider for Wink.
> ATM the Jackson module doesn't provide a Provider impl, it should get a proper implementation that sets up a reasonable configuration.  This has been working very, very well for me:
> {code}
>         ObjectMapper mapper = new ObjectMapper();
>         AnnotationIntrospector pair = new AnnotationIntrospector.Pair(
>             new JaxbAnnotationIntrospector(), new JacksonAnnotationIntrospector());
>         mapper.getDeserializationConfig().setAnnotationIntrospector(pair);
>         mapper.getSerializationConfig().setAnnotationIntrospector(pair);
>         JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();
>         provider.setMapper(mapper);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira