Serialize class name instead of class