title: Empty json array in fromJson
body: <p>In my Get method, I am deserializing an array response like this - </p>
  
  <pre><code>HttpResponse httpResponse = defaultHttpClient.execute(httpGet);
  
  HttpEntity httpEntity = httpResponse.getEntity();
  if (httpEntity != null) {
      InputStream inputStream = httpEntity.getContent();
      Header contentEncoding = httpResponse.getFirstHeader("Content-Encoding");
      if (contentEncoding != null &amp;&amp; contentEncoding.getValue().equalsIgnoreCase("gzip")) {
          inputStream = new GZIPInputStream(inputStream);
      }
  
  String resultString = convertStreamToString(inputStream); // final json string response object
  
  if(resultString == "{}")
  {
       resultString = "[]";
       Log.d("result", "in the condition");
  }
  
  inputStream.close();
  return new GsonBuilder().create().fromJson(resultString, objectClass);
  }
  </code></pre>
  
  <p>The <code>objectClass</code> is being sent as <code>Product[].class</code></p>
  
  <p>All this works fine, unless resultString is empty (no data is returned by api). When that is the case, deserialization fails. I tried to change <code>resultString</code> to an empty array json but the condition itself is not satisfied. </p>
  
  <p>Please tell how to deserialize an empty json to return empty object (and not null).</p>