Serde based on Serializable interface