title: GSON java.lang.IllegalArgumentException: class 'xx' declares multiple JSON fields named 'XX' AND StackOverflowError
body: <p>I want to convert a sqlResult mapped to a very complex Object to JSON in order to save it to a redis database a value. Now I'm a getting Error</p>
  
  <pre><code>java.lang.IllegalArgumentException: class 'xx' declares multiple JSON fields named 'XX'
  </code></pre>
  
  <p>How can I solve this problem without chaging the classes as mentioned in the error 'xx'?<br>
  Or are other libs avaiable, that are supporting converting object to and from JSON with supporting of multiple JSON fields names e.g. json-io?</p>
  
  <hr>
  
  <p>I updated my project with the following suggestedd class <strong><a href="https://stackoverflow.com/questions/16476513/class-a-declares-multiple-json-fields">class A declares multiple JSON fields</a></strong> in order to avoid multiple JSON fields.</p>
  
  <p>But now I have got a another problem<br>
  <strong><em>nested exception is: java.lang.StackOverflowError</em></strong> Any suggestions for that problem? Because I am using a very large collection/object for the convertion.</p>