References Deprecated
BeanSerializerBase
is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
BeanPropertyWriter
s that will handle
access value to serialize and call appropriate serializers to
write out JSON.Implementation Note
we will post-process resulting serializer,
to figure out actual serializers for final types. This must be
done from resolve
method, and NOT from constructor;
otherwise we could end up with an infinite loop.
Modifier and Type | Field and Description |
---|---|
private static final long |
Access | Constructor and Description |
---|---|
public | BeanSerializer(JavaType type, BeanSerializerBuilder
Builder object that contains collected information
that may be needed for serializer builder, BeanPropertyWriter[] Property writers used for actual serialization properties, BeanPropertyWriter[] filteredProperties)
|
protected | BeanSerializer(BeanSerializerBase src)
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
Alternate copy constructor that can be used to construct
standard |
protected | BeanSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter)
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
|
protected | BeanSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId)
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
|
protected | BeanSerializer(BeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude)
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
|
protected | BeanSerializer(BeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
|
Modifier and Type | Method and Description |
---|---|
protected BeanSerializerBase | asArraySerializer()
Implements abstract com.
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
Implementation has to check whether as-array serialization
is possible reliably; if (and only if) so, will construct
a |
public static BeanSerializer | |
public static BeanSerializer | createDummy(JavaType forType, BeanSerializerBuilder builder)
References Deprecated
BeanSerializer is deprecated or references (maybe indirectly) at least one deprecated element.
Method for constructing dummy bean serializer; one that never outputs any properties |
public 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. Main serialization method that will delegate actual output to
configured
|
public String | |
public JsonSerializer | unwrappingSerializer(NameTransformer
Name transformation to use to convert between names
of unwrapper properties unwrapper)Overrides com. Method that will return serializer instance that produces "unwrapped" serialization, if applicable for type being serialized (which is the case for some serializers that produce JSON Objects as output). |
protected BeanSerializerBase | withByNameInclusion(Set<String> toIgnore, Set<String> toInclude)
Implements abstract com.
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
Mutant factory used for creating a new instance with additional set of properties to ignore or include (from properties this instance otherwise has) |
public BeanSerializerBase | withFilterId(Object filterId)
Implements abstract com.
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
Mutant factory used for creating a new instance with different
filter id (used with |
public JsonSerializer | withIgnoredProperties(Set<String>
Set of property names to ignore for serialization; toIgnore)Overrides com. Mutant factory method called to create a new instance after excluding specified set of properties by name, if there is any. |
public BeanSerializerBase | withObjectIdWriter(ObjectIdWriter objectIdWriter)
Implements abstract com.
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
Mutant factory used for creating a new instance with different
|
protected BeanSerializerBase | withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Implements abstract com.
References Deprecated
BeanSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.
Mutant factory used for creating a new instance with modified set of properties. |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Hides com. |
BeanSerializer | back to summary |
---|---|
public BeanSerializer(JavaType type, BeanSerializerBuilder builder, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
|
BeanSerializer | back to summary |
---|---|
protected BeanSerializer(BeanSerializerBase src)
References Deprecated
See corresponding docs for further information. Alternate copy constructor that can be used to construct
standard |
BeanSerializer | back to summary |
---|---|
protected BeanSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter)
References Deprecated
See corresponding docs for further information. |
BeanSerializer | back to summary |
---|---|
protected BeanSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId)
References Deprecated
See corresponding docs for further information. |
BeanSerializer | back to summary |
---|---|
protected BeanSerializer(BeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude)
References Deprecated
See corresponding docs for further information. |
BeanSerializer | back to summary |
---|---|
protected BeanSerializer(BeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
References Deprecated
See corresponding docs for further information. |
asArraySerializer | back to summary |
---|---|
protected BeanSerializerBase asArraySerializer() Implements abstract com. References Deprecated
See corresponding docs for further information. Implementation has to check whether as-array serialization
is possible reliably; if (and only if) so, will construct
a
|
createDummy | back to summary |
---|---|
public static BeanSerializer createDummy(JavaType forType)
Deprecated Since 2.10
|
createDummy | back to summary |
---|---|
public static BeanSerializer createDummy(JavaType forType, BeanSerializerBuilder builder)
References Deprecated
See corresponding docs for further information. Method for constructing dummy bean serializer; one that never outputs any properties
|
serialize | back to summary |
---|---|
public void serialize(Object bean, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Main serialization method that will delegate actual output to
configured
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- |
unwrappingSerializer | back to summary |
---|---|
public JsonSerializer Overrides com. Doc from com. Method that will return serializer instance that produces "unwrapped" serialization, if applicable for type being serialized (which is the case for some serializers that produce JSON Objects as output). If no unwrapped serializer can be constructed, will simply return serializer as-is. Default implementation just returns serializer as-is, indicating that no unwrapped variant exists
|
withByNameInclusion | back to summary |
---|---|
protected BeanSerializerBase withByNameInclusion(Set<String> toIgnore, Set<String> toInclude) Implements abstract com. Doc from com. References Deprecated
See corresponding docs for further information. 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 BeanSerializerBase withFilterId(Object filterId) Implements abstract com. Doc from com. References Deprecated
See corresponding docs for further information. Mutant factory used for creating a new instance with different
filter id (used with
|
withIgnoredProperties | back to summary |
---|---|
public JsonSerializer Overrides com. Doc from com. Mutant factory method called to create a new instance after excluding specified set of properties by name, if there is any.
|
withObjectIdWriter | back to summary |
---|---|
public BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter) Implements abstract com. Doc from com. References Deprecated
See corresponding docs for further information. Mutant factory used for creating a new instance with different
|
withProperties | back to summary |
---|---|
protected BeanSerializerBase withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) Implements abstract com. Doc from com. References Deprecated
See corresponding docs for further information. 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)
|