Package net.solarnetwork.codec
Interface PropertySerializer
- All Known Implementing Classes:
BindingResultSerializer,JavaBeanXmlSerializer,JSONStringPropertySerializer,TemporalPropertySerializer,TimeZonePropertySerializer
public interface PropertySerializer
API for special handling of data serialization, in place of simply calling
String.valueOf().
This API is designed with implementations being thread-safe by default, so a single implementation can be instantiated once and used throughout an application.
- Version:
- 1.0
- Author:
- matt
-
Method Summary
-
Method Details
-
serialize
Serialize a property value.The
dataandpropertyNameparameters might not be used by different implementations, but allow for a single implementation to serialize more than one property of an object in different ways, if desired.- Parameters:
data- the source data being serialized, i.e. a JavaBeanpropertyName- the name of the property being serializedpropertyValue- the value of the property to serialize- Returns:
- the serialized value of the property
-