title: GSON stackoverflow error
body: <p>I'm trying to get the array of <code>filters</code> from a Json string using Gson, but im keep on getting this error, does anyone knows how can I fix this?</p>
  
  <p>Here is logCat output:</p>
  
  <pre><code> Process: com.betterbilljsonparser, PID: 20491
      java.lang.StackOverflowError
              at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:381)
              at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:376)
              at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:381)
              at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:376)
              at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:381)
              at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:376)
              at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:381)
              at ...
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:141)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:83)
              at com.google.gson.Gson.getAdapter(Gson.java:359)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getFieldAdapter(ReflectiveTypeAdapterFactory.java:122)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.access$100(ReflectiveTypeAdapterFactory.java:46)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.&lt;init&gt;(ReflectiveTypeAdapterFactory.java:92)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:91)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:142)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:83)
              at com.google.gson.Gson.getAdapter(Gson.java:359)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getFieldAdapter(ReflectiveTypeAdapterFactory.java:122)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.access$100(ReflectiveTypeAdapterFactory.java:46)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.&lt;init&gt;(ReflectiveTypeAdapterFactory.java:92)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:91)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:142)
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:83)
              at com.google.gson.Gson.getAdapter(Gson.java:359)
  </code></pre>
  
  <p>Here is my JSON string:</p>
  
  <pre><code>{
      "value": 1,
      "value": 2,
  
      "other_object":{
          "someval":"lorem",
          "other_val":false
      },
  
      "filters": [
          {
              "items": [
                  {
                      "default": true,
                      "order": 0,
                      "val": [
                          0
                      ],
                      "name": "Nope"
                  },
                  {
                      "default": false,
                      "name": "iPhone 5c",
                      "val": [
                          148
                      ],
                      "order": 1
                  },
                  {
                      "default": false,
                      "name": "iPhone 5s",
                      "val": [
                          149
                      ],
                      "order": 2
                  },
                  {
                      "default": false,
                      "name": "iPhone 6",
                      "val": [
                          147
                      ],
                      "order": 3
                  },
                  {
                      "default": false,
                      "name": "iPhone 6 Plus",
                      "val": [
                          146
                      ],
                      "order": 4
                  },
                  {
                      "default": false,
                      "name": "Galaxy S5",
                      "val": [
                          150
                      ],
                      "order": 5
                  },
                  {
                      "default": false,
                      "name": "Galaxy S6",
                      "val": [
                          154
                      ],
                      "order": 6
                  },
                  {
                      "default": false,
                      "name": "HTC One M9",
                      "val": [
                          155
                      ],
                      "order": 7
                  },
                  {
                      "default": false,
                      "name": "Sony Xperia Z3",
                      "val": [
                          152
                      ],
                      "order": 8
                  }
              ],
              "type": "long",
              "key": "handset.model",
              "title": "Want a new phone with your contract?"
          },
          {
              "items": [
                  {
                      "default": true,
                      "name": "3G",
                      "val": [],
                      "order": 0
                  },
                  {
                      "default": false,
                      "name": "4G",
                      "val": [
                          "4G"
                      ],
                      "order": 1
                  }
              ],
              "type": "str",
              "key": "network_generation_name",
              "title": "3G or 4G? (4G is faster)"
          }
      ]
  }
  </code></pre>
  
  <p>And here is my code:</p>
  
  <pre><code>Gson gson = new Gson();
              Response data = gson.fromJson(jsonString, Response.class);
  </code></pre>
  
  <p><strong>Response.class</strong></p>
  
  <pre><code>public class Response extends BaseMo {
  
      @Expose
      private List&lt;Filter&gt; filters = new ArrayList&lt;Filter&gt;();
  
      /**
       * @return The filters
       */
      public List&lt;Filter&gt; getFilters() {
          return filters;
      }
  
      /**
       * @param filters The filters
       */
      public void setFilters(List&lt;Filter&gt; filters) {
          this.filters = filters;
      }
  }
  </code></pre>
  
  <p><strong>Fiter.class</strong></p>
  
  <pre><code>public class Filter extends BaseMo {
  
      @Expose
      private List&lt;Item&gt; items = new ArrayList&lt;Item&gt;();
      @Expose
      private String type;
      @Expose
      private String key;
      @Expose
      private String title;
  
      /**
       *
       * @return
       * The items
       */
      public List&lt;Item&gt; getItems() {
          return items;
      }
  
      /**
       *
       * @param items
       * The items
       */
      public void setItems(List&lt;Item&gt; items) {
          this.items = items;
      }
  
      /**
       *
       * @return
       * The type
       */
      public String getType() {
          return type;
      }
  
      /**
       *
       * @param type
       * The type
       */
      public void setType(String type) {
          this.type = type;
      }
  
      /**
       *
       * @return
       * The key
       */
      public String getKey() {
          return key;
      }
  
      /**
       *
       * @param key
       * The key
       */
      public void setKey(String key) {
          this.key = key;
      }
  
      /**
       *
       * @return
       * The title
       */
      public String getTitle() {
          return title;
      }
  
      /**
       *
       * @param title
       * The title
       */
      public void setTitle(String title) {
          this.title = title;
      }
  
  }
  </code></pre>
  
  <p>and <strong>Item.class</strong></p>
  
  <pre><code>public class Item extends BaseMo {
  
      @SerializedName("default")
      @Expose
      private boolean _default;
      @Expose
      private String name;
      @Expose
      private List&lt;String&gt; val = new ArrayList&lt;String&gt;();
      @Expose
      private long order;
      public Item() {
  
      }
  
  
      public Item(boolean _default, String name, List&lt;String&gt; val, long order) {
          this._default = _default;
          this.name = name;
          this.val = val;
          this.order = order;
      }
  
      /**
       * @return The _default
       */
      public boolean isDefault() {
          return _default;
      }
  
      /**
       * @param _default The default
       */
      public void setDefault(boolean _default) {
          this._default = _default;
      }
  
      /**
       * @return The name
       */
      public String getName() {
          return name;
      }
  
      /**
       * @param name The name
       */
      public void setName(String name) {
          this.name = name;
      }
  
      /**
       * @return The val
       */
      public List&lt;String&gt; getVal() {
          return val;
      }
  
      /**
       * @param val The val
       */
      public void setVal(List&lt;String&gt; val) {
          this.val = val;
      }
  
      /**
       * @return The order
       */
      public long getOrder() {
          return order;
      }
  
      /**
       * @param order The order
       */
      public void setOrder(long order) {
          this.order = order;
      }
  
  }
  </code></pre>