Class DefaultBaseTypeLimitingValidator

java.lang.Object
com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator
com.fasterxml.jackson.databind.jsontype.DefaultBaseTypeLimitingValidator
All Implemented Interfaces:
Serializable

public class DefaultBaseTypeLimitingValidator extends PolymorphicTypeValidator implements Serializable
PolymorphicTypeValidator that will only allow polymorphic handling if the base type is NOT one of potential dangerous base types (see isUnsafeBaseType(com.fasterxml.jackson.databind.cfg.MapperConfig<?>, com.fasterxml.jackson.databind.JavaType) for specific list of such base types). No further validation is performed on subtype.

Note that when using potentially unsafe base type like Object a custom implementation (or subtype with override) is needed. Most commonly subclasses would override both isUnsafeBaseType(com.fasterxml.jackson.databind.cfg.MapperConfig<?>, com.fasterxml.jackson.databind.JavaType) and isSafeSubType(com.fasterxml.jackson.databind.cfg.MapperConfig<?>, com.fasterxml.jackson.databind.JavaType, com.fasterxml.jackson.databind.JavaType): former to allow all (or just more) base types, and latter to add actual validation of subtype.

Since:
2.11
See Also: