title: Stackoverflow while using gson api's
body: <p>I am getting stackoverflow error while deserializing java class.</p>
  
  <p>Code   </p>
  
  <pre><code>Gson gson = gsonBuilder.create();
  Type listType = new TypeToken&lt;List&lt;StorageEntity&gt;&gt;() {}.getType();
  List&lt;StorageEntity&gt; logObj = gson.fromJson (dbDocument, listType);
  </code></pre>
  
  <p>When I do gson.fromJson (dbDocument, listType), I am getting below mentioned stack trace. </p>
  
  <pre><code>   java.lang.StackOverflowError
          at com.google.gson.SimpleCharStream.GetImage(SimpleCharStream.java)
          at   com.google.gson.JsonParserTokenManager.jjFillToken(JsonParserTokenManager.java)
  </code></pre>
  
  <p>I have google it and idea that gson is not able to parse long string. Help me to resolve the issue.</p>
  
  <p>Problem is something like this</p>
  
  <p>http://code.google.com/p/google-gson/issues/detail?id=96</p>
  
  <p>but I didn't found any answer.</p>