Interface IObjectSerialDeserial<T>


  • public interface IObjectSerialDeserial<T>
    General interface to implement object serializers/deserializers.
    Author:
    andrea del bene
    • Method Detail

      • serializeObject

        T serializeObject​(Object target,
                          String mimeType)
        Returns a given representation of the target object.
        Parameters:
        targetObject - the object to convert to the given format.
        mimeType - the target MIME type.
        Returns:
        the representation of the object.
      • deserializeObject

        <E> E deserializeObject​(T source,
                                Class<E> targetClass,
                                String mimeType)
        Extract an object instance from a given source object.
        Type Parameters:
        T - the source object type.
        Parameters:
        source - the source object.
        targetClass - the type of the returned object.
        mimeType - the target MIME type.
        Returns:
        the extracted object.