Deprecated
as a consequence of StdSerializer being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| protected final AnyGetterWriter | _anyGetterWriter
Handler for |
| protected final JavaType | |
| protected final BeanPropertyWriter[] | _filteredProps
Optional filters used to suppress output of properties that are only to be included in certain views |
| protected final ObjectIdWriter | _objectIdWriter
If this POJO can be alternatively serialized using just an object id to denote a reference to previously serialized object, this Object will handle details. |
| protected final Object | _propertyFilterId
Id of the bean property filter to use, if any; null if none. |
| protected final BeanPropertyWriter[] | _props
Writers used for outputting actual property values |
| protected final JsonFormat. | _serializationShape
Requested shape from bean class annotations. |
| protected final AnnotatedMember | _typeId
If using custom type ids (usually via getter, or field), this is the reference to that member. |
| protected static final PropertyName | |
| protected static final BeanPropertyWriter[] |
| Access | Constructor and Description |
|---|---|
| protected | BeanSerializerBase(JavaType
Nominal type of values handled by this serializer type, BeanSerializerBuilder Builder for accessing other collected information builder, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)Constructor used by |
| protected | BeanSerializerBase(BeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Deprecated
as a consequence of
BeanSerializerBase being deprecated.
|
| protected | BeanSerializerBase(BeanSerializerBase src, ObjectIdWriter objectIdWriter)
Deprecated
as a consequence of
BeanSerializerBase being deprecated.
|
| protected | BeanSerializerBase(BeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId)
Deprecated
as a consequence of
BeanSerializerBase being deprecated.
|
| protected | |
| protected | |
| protected | BeanSerializerBase(BeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude)
Deprecated
as a consequence of
BeanSerializerBase being deprecated.
|
| protected | BeanSerializerBase(BeanSerializerBase src)
Deprecated
as a consequence of
Copy-constructor that is useful for sub-classes that just want to
copy all super-class properties without modifications.
BeanSerializerBase being deprecated.
|
| protected | BeanSerializerBase(BeanSerializerBase src, NameTransformer unwrapper)
Deprecated
as a consequence of
Copy-constructor that will also rename properties with given prefix
(if it's non-empty)
BeanSerializerBase being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| protected final String | |
| protected void | _serializeObjectId(Object bean, JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer, WritableObjectId objectId)
|
| protected final void | _serializeWithObjectId(Object bean, JsonGenerator gen, SerializerProvider provider, boolean startEndObject)
|
| protected final void | _serializeWithObjectId(Object bean, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer)
|
| protected final WritableTypeId | |
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType
Type of element (entity like property) being visited typeHint)Overrides com. Implements com. |
| protected abstract BeanSerializerBase | asArraySerializer()
Deprecated
as a consequence of
Mutant factory for creating a variant that output POJO as a
JSON Array.
BeanSerializerBase being deprecated.
|
| 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. |
| protected JsonSerializer | findConvertingSerializer(SerializerProvider provider, BeanPropertyWriter prop)
Helper method that can be used to see if specified property is annotated to indicate use of a converter for property value (in case of container types, it is container type itself, not key or content type). |
| public JsonNode | getSchema(SerializerProvider
The serializer provider. provider, Type A hint about the type. typeHint)Overrides com. Implements com.
Deprecated
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
| public Iterator | properties()
Overrides com. |
| private static final BeanPropertyWriter[] | |
| public void | resolve(SerializerProvider
Provider that has constructed serializer this method
is called on. provider)Implements com. ResolvableSerializer to be able to
properly handle cyclic type references.
|
| public abstract void | serialize(Object
Value to serialize; can not be null. bean, 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. |
| protected void | |
| protected void | serializeFieldsFiltered(Object bean, JsonGenerator gen, SerializerProvider provider)
Alternative serialization method that gets called when there is a
|
| public void | serializeWithType(Object
Value to serialize; can not be null. bean, 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 boolean | usesObjectId()
Overrides com. |
| protected abstract BeanSerializerBase | withByNameInclusion(Set<String> toIgnore, Set<String> toInclude)
Deprecated
as a consequence of
Mutant factory used for creating a new instance with additional
set of properties to ignore or include (from properties this instance otherwise has)
BeanSerializerBase being deprecated.
|
| public abstract BeanSerializerBase | withFilterId(Object filterId)
Overrides com.
Deprecated
as a consequence of
Mutant factory used for creating a new instance with different
filter id (used with BeanSerializerBase being deprecated.
JsonFilter annotation)
|
| protected BeanSerializerBase | withIgnorals(Set<String> toIgnore)
Deprecated
Since 2.12
Mutant factory used for creating a new instance with additional
set of properties to ignore (from properties this instance otherwise has)
|
| protected BeanSerializerBase | withIgnorals(String[] toIgnore)
Deprecated
since 2.8
Mutant factory used for creating a new instance with additional
set of properties to ignore (from properties this instance otherwise has)
|
| public abstract BeanSerializerBase | withObjectIdWriter(ObjectIdWriter objectIdWriter)
Deprecated
as a consequence of
Mutant factory used for creating a new instance with different
BeanSerializerBase being deprecated.
ObjectIdWriter.
|
| protected abstract BeanSerializerBase | withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Deprecated
as a consequence of
Mutant factory used for creating a new instance with modified set
of properties.
BeanSerializerBase being deprecated.
|
| _anyGetterWriter | back to summary |
|---|---|
| protected final AnyGetterWriter _anyGetterWriter Handler for | |
| _beanType | back to summary |
|---|---|
protected final JavaType _beanType
| |
| _filteredProps | back to summary |
|---|---|
| protected final BeanPropertyWriter[] _filteredProps Optional filters used to suppress output of properties that are only to be included in certain views | |
| _objectIdWriter | back to summary |
|---|---|
| protected final ObjectIdWriter _objectIdWriter If this POJO can be alternatively serialized using just an object id to denote a reference to previously serialized object, this Object will handle details. | |
| _propertyFilterId | back to summary |
|---|---|
| protected final Object _propertyFilterId Id of the bean property filter to use, if any; null if none. | |
| _props | back to summary |
|---|---|
| protected final BeanPropertyWriter[] _props Writers used for outputting actual property values | |
| _serializationShape | back to summary |
|---|---|
| protected final JsonFormat. Requested shape from bean class annotations. | |
| _typeId | back to summary |
|---|---|
| protected final AnnotatedMember _typeId If using custom type ids (usually via getter, or field), this is the reference to that member. | |
| NAME_FOR_OBJECT_REF | back to summary |
|---|---|
| protected static final PropertyName NAME_FOR_OBJECT_REF | |
| NO_PROPS | back to summary |
|---|---|
| protected static final BeanPropertyWriter[] NO_PROPS | |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(JavaType type, BeanSerializerBuilder builder, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) Constructor used by
| |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Deprecated as a consequence of | |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src, ObjectIdWriter objectIdWriter)
Deprecated as a consequence of | |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId)
Deprecated as a consequence of
| |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src, String[] toIgnore)
Deprecated
| |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src, Set<String> toIgnore)
Deprecated
| |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude)
Deprecated as a consequence of | |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src)
Deprecated as a consequence of Copy-constructor that is useful for sub-classes that just want to copy all super-class properties without modifications. | |
| BeanSerializerBase | back to summary |
|---|---|
| protected BeanSerializerBase(BeanSerializerBase src, NameTransformer unwrapper)
Deprecated as a consequence of Copy-constructor that will also rename properties with given prefix (if it's non-empty) | |
| _customTypeId | back to summary |
|---|---|
| protected final String _customTypeId(Object bean)
Deprecated
| |
| _serializeObjectId | back to summary |
|---|---|
| protected void _serializeObjectId(Object bean, JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer, WritableObjectId objectId) throws IOException | |
| _serializeWithObjectId | back to summary |
|---|---|
| protected final void _serializeWithObjectId(Object bean, JsonGenerator gen, SerializerProvider provider, boolean startEndObject) throws IOException | |
| _serializeWithObjectId | back to summary |
|---|---|
| protected final void _serializeWithObjectId(Object bean, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) throws IOException | |
| _typeIdDef | back to summary |
|---|---|
protected final WritableTypeId _typeIdDef(TypeSerializer typeSer, Object bean, JsonToken valueShape)
| |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException Overrides com. Implements com. Doc from com. Get the representation of the schema to which this serializer will conform. | |
| asArraySerializer | back to summary |
|---|---|
| protected abstract BeanSerializerBase asArraySerializer()
Deprecated as a consequence of Mutant factory for creating a variant that output POJO as a JSON Array. Implementations may ignore this request if output as array is not possible (either at all, or reliably).
| |
| createContextual | back to summary |
|---|---|
| public JsonSerializer Implements com. Doc from com. Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property. Note that instance that this method is called on is typically shared one and as a result method should NOT modify this instance but rather construct and return a new instance. This instance should only be returned as-is, in case it is already suitable for use.
| |
| findConvertingSerializer | back to summary |
|---|---|
| protected JsonSerializer Helper method that can be used to see if specified property is annotated to indicate use of a converter for property value (in case of container types, it is container type itself, not key or content type).
| |
| getSchema | back to summary |
|---|---|
| public JsonNode getSchema(SerializerProvider provider, Type typeHint) throws JsonMappingException Overrides com. Implements com. Doc from com. Deprecated
Default implementation simply claims type is "string"; usually overriden by custom serializers.
| |
| properties | back to summary |
|---|---|
| public Iterator Overrides com. Doc from com. Accessor for iterating over logical properties that the type
handled by this serializer has, from serialization perspective.
Actual type of properties, if any, will be
| |
| rename | back to summary |
|---|---|
| private static final BeanPropertyWriter[] rename(BeanPropertyWriter[] props, NameTransformer transformer) | |
| resolve | back to summary |
|---|---|
| public void resolve(SerializerProvider provider) throws JsonMappingException Implements com. We need to implement
| |
| serialize | back to summary |
|---|---|
| public abstract void serialize(Object bean, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeFields | back to summary |
|---|---|
| protected void serializeFields(Object bean, JsonGenerator gen, SerializerProvider provider) throws IOException | |
| serializeFieldsFiltered | back to summary |
|---|---|
| protected void serializeFieldsFiltered(Object bean, JsonGenerator gen, SerializerProvider provider) throws IOException Alternative serialization method that gets called when there is a
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(Object bean, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) throws IOException Overrides com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles, using specified type serializer for embedding necessary type information.
Default implementation will throw For simple datatypes written as a single scalar value (JSON String, Number, Boolean), implementation would look like: // note: method to call depends on whether this type is serialized as JSON scalar, object or Array! typeSer.writeTypePrefixForScalar(value, gen); serialize(value, gen, provider); typeSer.writeTypeSuffixForScalar(value, gen);and implementations for type serialized as JSON Arrays or Objects would differ slightly, as START-ARRAY/END-ARRAY and
START-OBJECT/END-OBJECT pairs
need to be properly handled with respect to serializing of contents.
| |
| usesObjectId | back to summary |
|---|---|
| public boolean usesObjectId() Overrides com. Doc from com. Method that can be called to see whether this serializer instance will use Object Id to handle cyclic references.
| |
| withByNameInclusion | back to summary |
|---|---|
| protected abstract BeanSerializerBase withByNameInclusion(Set<String> toIgnore, Set<String> toInclude)
Deprecated as a consequence of Mutant factory used for creating a new instance with additional set of properties to ignore or include (from properties this instance otherwise has)
| |
| withFilterId | back to summary |
|---|---|
| public abstract BeanSerializerBase withFilterId(Object filterId) Overrides com. Deprecated as a consequence of Mutant factory used for creating a new instance with different
filter id (used with
| |
| withIgnorals | back to summary |
|---|---|
| protected BeanSerializerBase withIgnorals(Set<String> toIgnore)
Deprecated Since 2.12 Mutant factory used for creating a new instance with additional set of properties to ignore (from properties this instance otherwise has)
| |
| withIgnorals | back to summary |
|---|---|
| protected BeanSerializerBase withIgnorals(String[] toIgnore)
Deprecated since 2.8 Mutant factory used for creating a new instance with additional set of properties to ignore (from properties this instance otherwise has)
| |
| withObjectIdWriter | back to summary |
|---|---|
| public abstract BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter)
Deprecated as a consequence of Mutant factory used for creating a new instance with different
| |
| withProperties | back to summary |
|---|---|
| protected abstract BeanSerializerBase withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Deprecated as a consequence of Mutant factory used for creating a new instance with modified set of properties. Note in 2.11.x, need to keep non-abstract for slightly better compatibility (XML module extends)
| |