Package enterprises.iwakura.kirara.core
Interface Serializer
public interface Serializer
Kirara's serializer interface used to (de)serialize objects to and from byte arrays.
-
Method Summary
-
Method Details
-
serialize
Serializes an object to a byte array.- Parameters:
object- The object to serialize.- Returns:
- The serialized byte array.
-
deserialize
<T> T deserialize(byte[] response, Class<T> specifiedResponseClass, Map<String, List<String>> responseHeaders) Deserializes a byte array to an object of the specified class.- Type Parameters:
T- The type of the object to deserialize into.- Parameters:
response- The byte array to deserialize.specifiedResponseClass- The class to deserialize into.responseHeaders- The headers associated with the response, used for content type detection.- Returns:
- The deserialized object.
-