Package | Description |
---|---|
com.fasterxml.jackson.databind |
Basic data binding (mapping) functionality that
allows for reading JSON content into Java Objects (POJOs)
and JSON Trees (
JsonNode ), as well as
writing Java Objects and trees as JSON. |
com.fasterxml.jackson.databind.cfg |
Package that contains most of configuration-related classes;
exception being couple of most-commonly used configuration
things (like Feature enumerations) that are at the
main level (
com.fasterxml.jackson.databind ). |
com.fasterxml.jackson.databind.jsontype |
Package that contains interfaces that define how to implement
functionality for dynamically resolving type during deserialization.
|
com.fasterxml.jackson.databind.jsontype.impl |
Package that contains standard implementations for
TypeResolverBuilder
and
TypeIdResolver . |
Modifier and Type | Field and Description |
---|---|
protected PolymorphicTypeValidator |
ObjectMapper.DefaultTypeResolverBuilder._subtypeValidator
PolymorphicTypeValidator top use for validating that the subtypes
resolved are valid for use (usually to protect against possible
security issues) |
Modifier and Type | Method and Description |
---|---|
PolymorphicTypeValidator |
ObjectMapper.getPolymorphicTypeValidator()
Accessor for configured
PolymorphicTypeValidator used for validating
polymorphic subtypes used with explicit polymorphic types (annotation-based),
but NOT one with "default typing" (see ObjectMapper.activateDefaultTyping(PolymorphicTypeValidator)
for details). |
PolymorphicTypeValidator |
ObjectMapper.DefaultTypeResolverBuilder.subTypeValidator(MapperConfig<?> config) |
Modifier and Type | Method and Description |
---|---|
protected TypeResolverBuilder<?> |
ObjectMapper._constructDefaultTypeResolverBuilder(ObjectMapper.DefaultTyping applicability,
PolymorphicTypeValidator ptv)
Overridable factory method, separate to allow format-specific mappers (and specifically
XML-backed one, currently) to offer custom
TypeResolverBuilder subtypes. |
protected <T> T |
DatabindContext._throwSubtypeClassNotAllowed(JavaType baseType,
String subType,
PolymorphicTypeValidator ptv) |
protected <T> T |
DatabindContext._throwSubtypeNameNotAllowed(JavaType baseType,
String subType,
PolymorphicTypeValidator ptv) |
ObjectMapper |
ObjectMapper.activateDefaultTyping(PolymorphicTypeValidator ptv)
Convenience method that is equivalent to calling
|
ObjectMapper |
ObjectMapper.activateDefaultTyping(PolymorphicTypeValidator ptv,
ObjectMapper.DefaultTyping applicability)
Convenience method that is equivalent to calling
|
ObjectMapper |
ObjectMapper.activateDefaultTyping(PolymorphicTypeValidator ptv,
ObjectMapper.DefaultTyping applicability,
JsonTypeInfo.As includeAs)
Method for enabling automatic inclusion of type information, needed
for proper deserialization of polymorphic types (unless types
have been annotated with
JsonTypeInfo ). |
ObjectMapper |
ObjectMapper.activateDefaultTypingAsProperty(PolymorphicTypeValidator ptv,
ObjectMapper.DefaultTyping applicability,
String propertyName)
Method for enabling automatic inclusion of type information -- needed
for proper deserialization of polymorphic types (unless types
have been annotated with
JsonTypeInfo ) --
using "As.PROPERTY" inclusion mechanism and specified property name
to use for inclusion (default being "@class" since default type information
always uses class name as type identifier) |
static ObjectMapper.DefaultTypeResolverBuilder |
ObjectMapper.DefaultTypeResolverBuilder.construct(ObjectMapper.DefaultTyping t,
PolymorphicTypeValidator ptv) |
JavaType |
DatabindContext.resolveAndValidateSubType(JavaType baseType,
String subClass,
PolymorphicTypeValidator ptv)
Lookup method similar to
DatabindContext.resolveSubType(com.fasterxml.jackson.databind.JavaType, java.lang.String) but one that also validates
that resulting subtype is valid according to given PolymorphicTypeValidator . |
ObjectMapper |
ObjectMapper.setPolymorphicTypeValidator(PolymorphicTypeValidator ptv)
Method for specifying
PolymorphicTypeValidator to use for validating
polymorphic subtypes used with explicit polymorphic types (annotation-based),
but NOT one with "default typing" (see ObjectMapper.activateDefaultTyping(PolymorphicTypeValidator)
for details). |
Constructor and Description |
---|
DefaultTypeResolverBuilder(ObjectMapper.DefaultTyping t,
PolymorphicTypeValidator ptv) |
Modifier and Type | Field and Description |
---|---|
protected PolymorphicTypeValidator |
BaseSettings._typeValidator
Validator that is used to limit allowed polymorphic subtypes, mostly
for security reasons when dealing with untrusted content.
|
Modifier and Type | Method and Description |
---|---|
PolymorphicTypeValidator |
MapperConfig.getPolymorphicTypeValidator()
Simple accessor for default
PolymorphicTypeValidator to use for
legacy Default Typing methods (ObjectMapper.enableDefaultTyping() )
and annotation based enabling. |
PolymorphicTypeValidator |
BaseSettings.getPolymorphicTypeValidator() |
Modifier and Type | Method and Description |
---|---|
B |
MapperBuilder.activateDefaultTyping(PolymorphicTypeValidator subtypeValidator)
Convenience method that is equivalent to calling
|
B |
MapperBuilder.activateDefaultTyping(PolymorphicTypeValidator subtypeValidator,
ObjectMapper.DefaultTyping dti)
Convenience method that is equivalent to calling
|
B |
MapperBuilder.activateDefaultTyping(PolymorphicTypeValidator subtypeValidator,
ObjectMapper.DefaultTyping applicability,
JsonTypeInfo.As includeAs)
Method for enabling automatic inclusion of type information, needed
for proper deserialization of polymorphic types (unless types
have been annotated with
JsonTypeInfo ). |
B |
MapperBuilder.activateDefaultTypingAsProperty(PolymorphicTypeValidator subtypeValidator,
ObjectMapper.DefaultTyping applicability,
String propertyName)
Method for enabling automatic inclusion of type information -- needed
for proper deserialization of polymorphic types (unless types
have been annotated with
JsonTypeInfo ) --
using "As.PROPERTY" inclusion mechanism and specified property name
to use for inclusion (default being "@class" since default type information
always uses class name as type identifier) |
B |
MapperBuilder.polymorphicTypeValidator(PolymorphicTypeValidator ptv)
Method for assigning
PolymorphicTypeValidator to use for validating
subtypes when using Class name - based polymorphic deserialization
using annotations (validator used with "Default Typing" is specified by
passing in MapperBuilder.activateDefaultTyping(PolymorphicTypeValidator) instead). |
BaseSettings |
BaseSettings.with(PolymorphicTypeValidator v) |
Constructor and Description |
---|
BaseSettings(ClassIntrospector ci,
AnnotationIntrospector ai,
PropertyNamingStrategy pns,
TypeFactory tf,
TypeResolverBuilder<?> typer,
DateFormat dateFormat,
HandlerInstantiator hi,
Locale locale,
TimeZone tz,
Base64Variant defaultBase64,
PolymorphicTypeValidator ptv) |
Modifier and Type | Class and Description |
---|---|
class |
BasicPolymorphicTypeValidator
Standard
BasicPolymorphicTypeValidator implementation that users may want
to use for constructing validators based on simple class hierarchy and/or name patterns
to allow and/or deny certain subtypes. |
class |
DefaultBaseTypeLimitingValidator
PolymorphicTypeValidator that will only allow polymorphic handling if
the base type is NOT one of potential dangerous base types (see DefaultBaseTypeLimitingValidator.isUnsafeBaseType(com.fasterxml.jackson.databind.cfg.MapperConfig<?>, com.fasterxml.jackson.databind.JavaType)
for specific list of such base types). |
static class |
PolymorphicTypeValidator.Base
Shared base class with partial implementation (with all validation calls returning
PolymorphicTypeValidator.Validity.INDETERMINATE ) and convenience methods for indicating failure reasons. |
Modifier and Type | Class and Description |
---|---|
class |
LaissezFaireSubTypeValidator
Default
PolymorphicTypeValidator used unless explicit one is constructed
(and, in 2.11, MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES
not enabled). |
Modifier and Type | Field and Description |
---|---|
protected PolymorphicTypeValidator |
ClassNameIdResolver._subTypeValidator |
Modifier and Type | Method and Description |
---|---|
protected PolymorphicTypeValidator |
StdTypeResolverBuilder.reportInvalidBaseType(MapperConfig<?> config,
JavaType baseType,
PolymorphicTypeValidator ptv) |
PolymorphicTypeValidator |
StdTypeResolverBuilder.subTypeValidator(MapperConfig<?> config)
Overridable helper method for determining actual validator to use when constructing
type serializers and type deserializers.
|
protected PolymorphicTypeValidator |
StdTypeResolverBuilder.verifyBaseTypeValidity(MapperConfig<?> config,
JavaType baseType)
Helper method called to check that base type is valid regarding possible constraints
on basetype/subtype combinations allowed for polymorphic type handling.
|
Modifier and Type | Method and Description |
---|---|
static ClassNameIdResolver |
ClassNameIdResolver.construct(JavaType baseType,
MapperConfig<?> config,
PolymorphicTypeValidator ptv) |
static MinimalClassNameIdResolver |
MinimalClassNameIdResolver.construct(JavaType baseType,
MapperConfig<?> config,
PolymorphicTypeValidator ptv) |
protected TypeIdResolver |
StdTypeResolverBuilder.idResolver(MapperConfig<?> config,
JavaType baseType,
PolymorphicTypeValidator subtypeValidator,
Collection<NamedType> subtypes,
boolean forSer,
boolean forDeser)
Helper method that will either return configured custom
type id resolver, or construct a standard resolver
given configuration.
|
protected PolymorphicTypeValidator |
StdTypeResolverBuilder.reportInvalidBaseType(MapperConfig<?> config,
JavaType baseType,
PolymorphicTypeValidator ptv) |
Constructor and Description |
---|
ClassNameIdResolver(JavaType baseType,
TypeFactory typeFactory,
PolymorphicTypeValidator ptv) |
MinimalClassNameIdResolver(JavaType baseType,
TypeFactory typeFactory,
PolymorphicTypeValidator ptv) |
Copyright © 2008–2020 FasterXML. All rights reserved.