Serialize base class