Thanks
2014-10-20 11:15 GMT-05:00 hwaastad <[email protected]>:
> Hi,
> typical example:
>
> @Provider
> public class CustomJacksonJaxBJsonProvider extends JacksonJaxbJsonProvider
> {
>
> private static ObjectMapper commonMapper = null;
>
> public CustomJacksonJaxBJsonProvider() {
> if (commonMapper == null) {
> ObjectMapper mapper = new ObjectMapper();
>
> mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
>
>
> mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS,
> false);
> mapper.configure(SerializationFeature.INDENT_OUTPUT, false);
> mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
>
>
> mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
> mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE,
> false);
>
> mapper.registerModule(new JaxbAnnotationModule());
>
> commonMapper = mapper;
> }
> super.setMapper(commonMapper);
> }
> }
>
> br hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/serializeAsArray-JacksonJaxbJsonProvider-tp4672427p4672498.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
--
-------------------------------------------------------------------
*José Luis Cetina*
-------------------------------------------------------------------