Deprecated
as a consequence of ContainerSerializer being deprecated. See corresponding docs for further information.
Note
about the only configurable setting currently is ability to filter out entries with specified names.
| Modifier and Type | Field and Description |
|---|---|
| protected PropertySerializerMap | _dynamicValueSerializers
If value type cannot be statically determined, mapping from runtime value types to serializers are stored in this object. |
| protected final Object | _filterId
Id of the property filter to use, if any; null if none. |
| protected final Set | _ignoredEntries
Set of entries to omit during serialization, if any |
| protected final Set | _includedEntries
Set of entries to include during serialization, if null, it is ignored, empty will include nothing. |
| protected final IgnorePropertiesUtil. | _inclusionChecker
Helper object used for name-based filtering |
| protected JsonSerializer | _keySerializer
Key serializer to use, if it can be statically determined |
| protected final JavaType | _keyType
Declared type of keys |
| protected final BeanProperty | _property
Map-valued property being serialized with this instance |
| protected final boolean | _sortKeys
Flag set if output is forced to be sorted by keys (usually due to annotation). |
| protected final Object | _suppressableValue
Value that indicates suppression mechanism to use for values contained;
either "filter" (of which |
| protected final boolean | _suppressNulls
Flag that indicates what to do with `null` values, distinct from
handling of |
| protected JsonSerializer | _valueSerializer
Value serializer to use, if it can be statically determined |
| protected final JavaType | _valueType
Declared type of contained values |
| protected final boolean | _valueTypeIsStatic
Whether static types should be used for serialization of values or not (if not, dynamic runtime type is used) |
| protected final TypeSerializer | _valueTypeSerializer
Type identifier serializer used for values, if any. |
| public static final Object | |
| private static final long | |
| protected static final JavaType |
| Access | Constructor and Description |
|---|---|
| protected | MapSerializer(Set<String> ignoredEntries, Set<String> includedEntries, JavaType keyType, JavaType valueType, boolean valueTypeIsStatic, TypeSerializer vts, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer)
|
| protected | MapSerializer(Set<String> ignoredEntries, JavaType keyType, JavaType valueType, boolean valueTypeIsStatic, TypeSerializer vts, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer)
Deprecated
in 2.12, remove from 3.0
|
| protected | MapSerializer(MapSerializer src, BeanProperty property, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer, Set<String> ignoredEntries, Set<String> includedEntries)
Deprecated
as a consequence of
MapSerializer being deprecated.
|
| protected | MapSerializer(MapSerializer src, BeanProperty property, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer, Set<String> ignoredEntries)
Deprecated
in 2.12, remove from 3.0
|
| protected | MapSerializer(MapSerializer src, TypeSerializer vts, Object suppressableValue, boolean suppressNulls)
Deprecated
as a consequence of
MapSerializer being deprecated.
|
| protected | MapSerializer(MapSerializer src, Object filterId, boolean sortKeys)
Deprecated
as a consequence of
MapSerializer being deprecated.
|
| protected | MapSerializer(MapSerializer src, TypeSerializer vts, Object suppressableValue)
Deprecated
// since 2.9
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| protected final JsonSerializer | |
| protected final JsonSerializer | |
| private final JsonSerializer | |
| protected boolean | |
| protected Map | |
| public MapSerializer | _withValueTypeSerializer(TypeSerializer vts)
Implements abstract com.
Deprecated
as a consequence of
Method that needs to be implemented to allow construction of a new
serializer object with given MapSerializer being deprecated.
TypeSerializer, used when
addition type information is to be embedded.
|
| protected void | |
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType
Type of element (entity like property) being visited typeHint)Overrides com. Implements com. |
| public static MapSerializer | construct(Set<String> ignoredEntries, Set<String> includedEntries, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId)
Deprecated
as a consequence of
MapSerializer being deprecated.
|
| public static MapSerializer | construct(Set<String> ignoredEntries, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId)
Deprecated
as a consequence of
MapSerializer being deprecated.
|
| public static MapSerializer | construct(String[] ignoredList, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId)
Deprecated
Since 2.8 use the other overload
|
| public JsonSerializer | createContextual(SerializerProvider
Serializer provider to use for accessing config, other serializers provider, BeanProperty Method or field that represents the property
(and is used to access value to serialize).
Should be available; but there may be cases where caller cannot provide it and
null is passed instead (in which case impls usually pass 'this' serializer as is) property)Implements com. |
| public JsonSerializer | getContentSerializer()
Implements abstract com. |
| public JavaType | getContentType()
Implements abstract com. |
| public JsonSerializer | |
| public JsonNode | getSchema(SerializerProvider
The serializer provider. provider, Type A hint about the type. typeHint)Overrides com. Implements com.
Deprecated
Since 2.15
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
| public boolean | hasSingleElement(Map<?, ?> value)
Implements abstract com. |
| public boolean | isEmpty(SerializerProvider prov, Map<?, ?> value)
Overrides com. |
| public void | serialize(Map<?, ?>
Value to serialize; can not be null. value, JsonGenerator Generator used to output resulting Json content gen, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. provider)Implements abstract com. |
| public void | serializeFields(Map<?, ?> value, JsonGenerator gen, SerializerProvider provider)
General-purpose serialization for contents, where we do not necessarily know the value serialization, but we do know that no value suppression is needed (which simplifies processing a bit) |
| public void | serializeFieldsUsing(Map<?, ?> value, JsonGenerator gen, SerializerProvider provider, JsonSerializer<Object> ser)
Method called to serialize fields, when the value type is statically known, so that value serializer is passed and does not need to be fetched from provider. |
| public void | serializeFilteredAnyProperties(SerializerProvider provider, JsonGenerator gen, Object
Enclosing POJO that has any-getter used to obtain "any properties" bean, Map<?, ?> value, PropertyFilter filter, Object suppressableValue)Helper method used when we have a JSON Filter to use AND contents are "any properties" of a POJO. |
| public void | serializeFilteredFields(Map<?, ?> value, JsonGenerator gen, SerializerProvider provider, PropertyFilter filter, Object suppressableValue)
Helper method used when we have a JSON Filter to use for potentially filtering out Map entries. |
| public void | serializeOptionalFields(Map<?, ?> value, JsonGenerator gen, SerializerProvider provider, Object suppressableValue)
Serialization method called when exclusion filtering needs to be applied. |
| public void | serializeTypedFields(Map<?, ?> value, JsonGenerator gen, SerializerProvider provider, Object suppressableValue)
|
| public void | serializeWithoutTypeInfo(Map<?, ?> value, JsonGenerator gen, SerializerProvider provider)
General-purpose serialization for contents without writing object type. |
| public void | serializeWithType(Map<?, ?>
Value to serialize; can not be null. value, JsonGenerator Generator used to output resulting Json content gen, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. provider, TypeSerializer Type serializer to use for including type information typeSer)Overrides com. |
| public MapSerializer | withContentInclusion(Object suppressableValue, boolean suppressNulls)
Deprecated
as a consequence of
Mutant factory for constructing an instance with different inclusion strategy
for content (Map values).
MapSerializer being deprecated.
|
| public MapSerializer | |
| public MapSerializer | withFilterId(Object filterId)
Overrides com.
Deprecated
as a consequence of
Mutant factory method that is called if contextual configuration indicates that
a specific filter (as specified by MapSerializer being deprecated.
filterId) is to be used for
serialization.
|
| public MapSerializer | withResolved(BeanProperty property, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer, Set<String> ignored, Set<String> included, boolean sortKeys)
Deprecated
as a consequence of
MapSerializer being deprecated.
|
| public MapSerializer | withResolved(BeanProperty property, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer, Set<String> ignored, boolean sortKeys)
Deprecated
as a consequence of
MapSerializer being deprecated.
|