java.lang.Object
tools.jackson.databind.util.BeanUtil
Helper class that contains functionality needed by both serialization
and deserialization side.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
checkUnsupportedType
(MapperConfig<?> config, JavaType type) Helper method called byBeanDeserializerFactory
andBeanSerializerFactory
to check if given unrecognized type (to be (de)serialized as general POJO) is one of "well-known" types for which there would be a datatype module; and if so, return appropriate failure message to give to caller.static Object
getDefaultValue
(JavaType type) Accessor used to find out "default value" to use for comparing values to serialize, to determine whether to exclude value from serialization with inclusion type ofJsonInclude.Include.NON_DEFAULT
.static boolean
isJodaTimeClass
(Class<?> rawType) static String
stdManglePropertyName
(String basename, int offset) Deprecated.
-
Constructor Details
-
BeanUtil
public BeanUtil()
-
-
Method Details
-
stdManglePropertyName
Deprecated.since 3.0.0-rc2 UseDefaultAccessorNamingStrategy
instead -
getDefaultValue
Accessor used to find out "default value" to use for comparing values to serialize, to determine whether to exclude value from serialization with inclusion type ofJsonInclude.Include.NON_DEFAULT
.Default logic is such that for primitives and wrapper types for primitives, expected defaults (0 for `int` and `java.lang.Integer`) are returned; for Strings, empty String, and for structured (Maps, Collections, arrays) and reference types, criteria
JsonInclude.Include.NON_DEFAULT
is used. -
checkUnsupportedType
Helper method called byBeanDeserializerFactory
andBeanSerializerFactory
to check if given unrecognized type (to be (de)serialized as general POJO) is one of "well-known" types for which there would be a datatype module; and if so, return appropriate failure message to give to caller. -
isJodaTimeClass
-
DefaultAccessorNamingStrategy
instead