public final class SecurityJackson2Modules
extends java.lang.Object
ObjectMapper mapper = new ObjectMapper(); mapper.registerModules(SecurityJackson2Modules.getModules());Above code is equivalent to
ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); mapper.registerModule(new CoreJackson2Module()); mapper.registerModule(new CasJackson2Module()); mapper.registerModule(new WebJackson2Module());
Modifier and Type | Method and Description |
---|---|
static void |
enableDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper mapper) |
static java.util.List<com.fasterxml.jackson.databind.Module> |
getModules(java.lang.ClassLoader loader) |
public static void enableDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper mapper)
public static java.util.List<com.fasterxml.jackson.databind.Module> getModules(java.lang.ClassLoader loader)
loader
- the ClassLoader to use