title: Solr-java error: class com.restfb.types.Post declares multiple JSON fields named type
body: <p>I'm trying to convert rest-facebook response to a Post class object as follows:</p>
  
  <pre><code>Post post = gson.fromJson(restFBResponse.toString(), Post.class);
  </code></pre>
  
  <p>where, <code>restFBResponse</code> is a post from Facebook. But it is resulting into error:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: class com.restfb.types.Post declares multiple JSON fields named type
  </code></pre>
  
  <p>I think this is due to:</p>
  
  <pre><code>1)
  class Post extends NamedFacebookType{
    @Facebook
    private String type;
    //and some more class members
  }
  
  2)
  class NamedFacebookType extends FacebookType {
    //few class members
  }
  
  3)
  class FacebookType implements Serializable {
    @Facebook
    private String type;
    //and some more class members
  }
  </code></pre>
  
  <p>So, <code>private String type;</code> is being declared twice, in <code>class Post</code> and <code>class FacebookType</code>.</p>
  
  <p>1) If such re-declaration occurs in subclass,should it not be overridden? and </p>
  
  <p>2) How can I overcome this error <code>class com.restfb.types.Post declares multiple JSON fields named type</code>?</p>