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

    Modifier and Type
    Method
    Description
    serialize(Object data, String propertyName, Object propertyValue)
    Serialize a property value.
  • Method Details

    • serialize

      Object serialize(Object data, String propertyName, Object propertyValue)
      Serialize a property value.

      The data and propertyName parameters 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 JavaBean
      propertyName - the name of the property being serialized
      propertyValue - the value of the property to serialize
      Returns:
      the serialized value of the property