Interface Serializer<T,S>
- Type Parameters:
T- the type of the source domain objectS- the type of the serialized representation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Defines a functional contract for transforming domain objects
into their serialized representations.
Note: This is an experimental feature and is currently considered unstable.
Implementations are responsible for converting strongly-typed
objects into formats suitable for storage, caching, or
network transmission (e.g., transforming a POJO into a Map<String, Object>).
- Since:
- 0.3
- Author:
- a8kj7sea
-
Method Summary
-
Method Details
-
serialize
Serializes the provided domain object into its encoded form.- Parameters:
object- the object to serialize, may benull- Returns:
- the serialized representation of type
S, ornullif serialization fails or input isnull
-