use of org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector in project jersey by jersey.
the class MyObjectMapperProvider method createJaxbJacksonAnnotationIntrospector.
private static Pair createJaxbJacksonAnnotationIntrospector() {
final AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector();
final AnnotationIntrospector jacksonIntrospector = new JacksonAnnotationIntrospector();
return new AnnotationIntrospector.Pair(jacksonIntrospector, jaxbIntrospector);
}
use of org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector in project opennms by OpenNMS.
the class JacksonUtils method createDefaultObjectMapper.
public static ObjectMapper createDefaultObjectMapper() {
final ObjectMapper mapper = new ObjectMapper();
final AnnotationIntrospector introspectorPair = AnnotationIntrospector.pair(new JacksonAnnotationIntrospector(), new JaxbAnnotationIntrospector());
mapper.setDeserializationConfig(mapper.getDeserializationConfig().withAnnotationIntrospector(introspectorPair));
mapper.setSerializationConfig(mapper.getSerializationConfig().withAnnotationIntrospector(introspectorPair));
return mapper;
}
use of org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector in project oxAuth by GluuFederation.
the class ServerUtil method createJsonMapper.
public static ObjectMapper createJsonMapper() {
final AnnotationIntrospector jaxb = new JaxbAnnotationIntrospector();
final AnnotationIntrospector jackson = new JacksonAnnotationIntrospector();
final AnnotationIntrospector pair = new AnnotationIntrospector.Pair(jackson, jaxb);
final ObjectMapper mapper = new ObjectMapper();
mapper.getDeserializationConfig().withAnnotationIntrospector(pair);
mapper.getSerializationConfig().withAnnotationIntrospector(pair);
return mapper;
}
use of org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector in project oxCore by GluuFederation.
the class Util method createJsonMapper.
/**
* Creates json mapper.
*
* @return json mapper
*/
public static ObjectMapper createJsonMapper() {
final AnnotationIntrospector jaxb = new JaxbAnnotationIntrospector();
final AnnotationIntrospector jackson = new JacksonAnnotationIntrospector();
final AnnotationIntrospector pair = new AnnotationIntrospector.Pair(jackson, jaxb);
final ObjectMapper mapper = new ObjectMapper();
mapper.getDeserializationConfig().withAnnotationIntrospector(pair);
mapper.getSerializationConfig().withAnnotationIntrospector(pair);
return mapper;
}
use of org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector in project zm-mailbox by Zimbra.
the class JaxbToJsonTest method getSimpleJsonJaxbMapper.
public ObjectMapper getSimpleJsonJaxbMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(new JacksonAnnotationIntrospector(), new JaxbAnnotationIntrospector()));
mapper.enable(SerializationConfig.Feature.INDENT_OUTPUT);
return mapper;
}
Aggregations