Package jodd.json
Class BeanSerializer
java.lang.Object
jodd.json.TypeJsonVisitor
jodd.json.BeanSerializer
Bean visitor that serializes properties of a bean.
It analyzes the rules for inclusion/exclusion of a property.
-
Field Summary
FieldsFields inherited from class jodd.json.TypeJsonVisitor
classMetadataName, count, declared, jsonContext, type, typeData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidonSerializableProperty(String propertyName, Class propertyType, Object value) Invoked on serializable properties, that have passed all the rules.protected final voidonSerializableProperty(String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor) Reads property value andserializes it.private ObjectreadProperty(Object source, jodd.introspector.PropertyDescriptor propertyDescriptor) Reads property using property descriptor.voidSerializes a bean.Methods inherited from class jodd.json.TypeJsonVisitor
onProperty, visit
-
Field Details
-
source
-
-
Constructor Details
-
BeanSerializer
-
-
Method Details
-
serialize
public void serialize()Serializes a bean. -
onSerializableProperty
protected final void onSerializableProperty(String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor) Reads property value andserializes it.- Specified by:
onSerializablePropertyin classTypeJsonVisitor
-
onSerializableProperty
Invoked on serializable properties, that have passed all the rules. Property type isnullfor metadata class name property. -
readProperty
Reads property using property descriptor.
-