title: How to ignore Json parse error?
body: <p>Query returns a list, but sometimes objects in that list can't be parsed. In this case I want to return null and return list with null objects. How to do this? Now I try to create custom adapter</p>
  
  <pre><code>public class ServiceMenuItemAdapterFactory implements TypeAdapterFactory {
  @Override
  public &lt;T&gt; TypeAdapter&lt;T&gt; create(Gson gson, TypeToken&lt;T&gt; type) {
      if (type.getRawType() != ServiceMenuItem.class) return null;
  
      TypeAdapter&lt;ServiceMenuItem&gt; defaultAdapter = (TypeAdapter&lt;ServiceMenuItem&gt;) gson.getDelegateAdapter(this, type);
      return (TypeAdapter&lt;T&gt;) new ServiceMenuItemAdapter(defaultAdapter);
  }
  
  private class ServiceMenuItemAdapter extends TypeAdapter&lt;ServiceMenuItem&gt; {
  
      protected TypeAdapter&lt;ServiceMenuItem&gt; defaultAdapter;
  
  
      public ServiceMenuItemAdapter(TypeAdapter&lt;ServiceMenuItem&gt; defaultAdapter) {
          this.defaultAdapter = defaultAdapter;
      }
  
      @Override
      public void write(JsonWriter out, ServiceMenuItem value) throws IOException {
          defaultAdapter.write(out, value);
      }
  
      @Override
      public ServiceMenuItem read(JsonReader in) throws IOException {
         try{
             return defaultAdapter.read(in);
         }
         catch(Exception e){
             return null
         }
      }
  </code></pre>