title: Flexjson or Gson : Protect object references after object serialization
body: <p>I serializing a list with <code>flexjson</code>. After serialization, I printing object <code>hashcode()</code> and I would check to see if the objects are equal.</p>
  
  <p>Problem, after the operation the object reference are changing. I don't want it. </p>
  
  <p>My code;</p>
  
  <pre><code>    String sameOfString="sameOfString";
      List&lt;Object&gt; list=new ArrayList&lt;Object&gt;();
      list.add(sameOfString);
      list.add(sameOfString);
      list.add("differentString");
  
      for(Object str:list){
          System.out.println(str.hashCode());
      }
      **System.out.println(list.get(0)==list.get(1));**
      System.out.println(list.get(0)==list.get(2));
      System.out.println("--");
      String json= new JSONSerializer().exclude("*.class").deepSerialize(list);
      List&lt;String&gt; listDeserilized = (List&lt;String&gt;) new JSONDeserializer().deserialize(json);
      for(Object str:listDeserilized){
          System.out.println(str.hashCode());
      }
      **System.out.println(listDeserilized.get(0)==listDeserilized.get(1));**
      System.out.println(listDeserilized.get(0)==listDeserilized.get(2));
  </code></pre>
  
  <p>And output..</p>
  
  <blockquote>
    <p>1018069468</p>
    
    <p>1018069468</p>
    
    <p>199675306</p>
    
    <p><strong>true</strong></p>
    
    <p>false</p>
    
    <p>-</p>
    
    <p>1018069468</p>
    
    <p>1018069468</p>
    
    <p>199675306</p>
    
    <p><strong>false</strong></p>
    
    <p>false</p>
  </blockquote>
  
  <p>How can solve this problem?</p>