Serialize correctly to/from clipboard