title: Making GsonRequest to accept empty list or null array
body: <p>I have a Json data to be pulled from a server. This data contains several objects and arrays. </p>
  
  <p>The first model is as follows:</p>
  
  <pre><code>{
    "results": [
      {
        "id": "17",
        "name": "Accessories",
        "child": [
          {
            "id": "371",
            "name": "Belt"
          },
          {
            "id": "55",
            "name": "Derp"
          },
          ...
        ]
      }
    ]
  }
  </code></pre>
  
  <p>However, some of the <code>results</code> array doesn't have <code>child</code> array. Instead, it have a String with an empty value.</p>
  
  <pre><code>{
    "results": [
      {
        "id": "19",
        "name": "Stuff",
        "child": ""
      }
    ]
  }
  </code></pre>
  
  <p>When the code is executed, it returns this line:</p>
  
  <pre><code>com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING
  </code></pre>
  
  <p>This is how the Model looks like:</p>
  
  <pre><code>public class CategoryModel {
      @SerializedName("id")
      private String category_id;
      private String name;
      private ArrayList&lt;CategoryChildModel&gt; child;
  
      ...
  }
  </code></pre>
  
  <p>And this is how I implement the GsonRequest (which using Volley as background asynctask):</p>
  
  <pre><code>private void loadCategory() {
      mRequestQueue = Volley.newRequestQueue(getActivity());
  
      String url = Constants.CATEGORIES_LIST;
  
      GsonRequest&lt;CategoryContainer&gt; myReq = new GsonRequest&lt;CategoryContainer&gt;(
              Request.Method.GET, url, CategoryContainer.class,
              createMyReqSuccessListener(), createMyReqErrorListener());
  
      mRequestQueue.add(myReq);
  }
  </code></pre>
  
  <p>So, anyone knows how to make null object pass through GsonRequest?</p>