Package jodd.json
Class BeanSerializer
- java.lang.Object
-
- jodd.json.TypeJsonVisitor
-
- jodd.json.BeanSerializer
-
public class BeanSerializer extends TypeJsonVisitor
Bean visitor that serializes properties of a bean. It analyzes the rules for inclusion/exclusion of a property.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object
source
-
Fields inherited from class jodd.json.TypeJsonVisitor
classMetadataName, count, declared, jsonContext, type, typeData
-
-
Constructor Summary
Constructors Constructor Description BeanSerializer(JsonContext jsonContext, java.lang.Object bean)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
onSerializableProperty(java.lang.String propertyName, java.lang.Class propertyType, java.lang.Object value)
Invoked on serializable properties, that have passed all the rules.protected void
onSerializableProperty(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor)
Reads property value andserializes it
.void
serialize()
Serializes a bean.-
Methods inherited from class jodd.json.TypeJsonVisitor
onProperty, visit
-
-
-
-
Constructor Detail
-
BeanSerializer
public BeanSerializer(JsonContext jsonContext, java.lang.Object bean)
-
-
Method Detail
-
serialize
public void serialize()
Serializes a bean.
-
onSerializableProperty
protected final void onSerializableProperty(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor)
Reads property value andserializes it
.- Specified by:
onSerializableProperty
in classTypeJsonVisitor
-
onSerializableProperty
protected void onSerializableProperty(java.lang.String propertyName, java.lang.Class propertyType, java.lang.Object value)
Invoked on serializable properties, that have passed all the rules. Property type isnull
for metadata class name property.
-
-