title: How to make a class serializable if it include a field of "Object"
body: <pre><code>public class A implements Serializable
  {
      private static final long serialVersionUID = 1L;
      private Object value;
      private Type type;
  ....
  }
  </code></pre>
  
  <p>It includes "Object" which is not serializable, so class A will be rendered as not serializable.</p>
  
  <p>"Object value" could be Integer, String..., depending on "Type type"</p>
  
  <p>How to make A serializable? 
  Thanks in advance!</p>
  
  <p>EDIT:
  Will "Object value" get lost (when de-serialing) if using "private transient Object value"? I don't want to lost it.</p>
  
  <p>Is there a general serializable Object type?</p>