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.Objectsource-
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 voidonSerializableProperty(java.lang.String propertyName, java.lang.Class propertyType, java.lang.Object value)Invoked on serializable properties, that have passed all the rules.protected voidonSerializableProperty(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor)Reads property value andserializes it.voidserialize()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:
onSerializablePropertyin 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 isnullfor metadata class name property.
-
-