Serialize task