Interface SerDes
- All Known Implementing Classes:
JacksonSerDes,NoopSerDes
public interface SerDes
-
Method Summary
-
Method Details
-
serialize
Serializes an object to a JSON string.- Parameters:
value- the object to serialize- Returns:
- the JSON string representation, or null if value is null
-
deserialize
Deserializes a JSON string to an object of the specified generic type.This method supports complex generic types like
List<MyObject>orMap<String, MyObject>that cannot be represented by a simpleClassobject.Usage example:
List<String> items = serDes.deserialize(json, new TypeToken<List<String>>() {});- Type Parameters:
T- the target type- Parameters:
data- the JSON string to deserializetypeToken- the type token capturing the generic type information- Returns:
- the deserialized object, or null if data is null
-