Example usage for com.fasterxml.jackson.databind.type TypeFactory defaultInstance

List of usage examples for com.fasterxml.jackson.databind.type TypeFactory defaultInstance

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind.type TypeFactory defaultInstance.

Prototype

public static TypeFactory defaultInstance() 

Source Link

Usage

From source file:org.openecomp.sdnc.sli.aai.AAIService.java

public static ObjectMapper getObjectMapper() {
    ObjectMapper mapper = new ObjectMapper();
    AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
    AnnotationIntrospector secondary = new JacksonAnnotationIntrospector();
    mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(introspector, secondary));
    mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    mapper.setSerializationInclusion(Include.NON_NULL);
    return mapper;
}