Example usage for com.fasterxml.jackson.databind ObjectMapper getDeserializationConfig

List of usage examples for com.fasterxml.jackson.databind ObjectMapper getDeserializationConfig

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind ObjectMapper getDeserializationConfig.

Prototype

public DeserializationConfig getDeserializationConfig() 

Source Link

Document

Method that returns the shared default DeserializationConfig object that defines configuration settings for deserialization.

Usage

From source file:org.springframework.security.jackson2.SecurityJacksonModules.java

public static void enableDefaultTyping(ObjectMapper mapper) {
    if (!ObjectUtils.isEmpty(mapper)) {
        TypeResolverBuilder<?> typeBuilder = mapper.getDeserializationConfig().getDefaultTyper(null);
        if (ObjectUtils.isEmpty(typeBuilder)) {
            mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
        }//from  w ww. j  a  va  2s.  c  om
    }
}