title: Forcing JSON JAXB to ignore 'type' properties for polymorphic types with Jersey
body: <p>I am using an abstract class to localize my models to different languages. This is the inheritance chain that I have set up:</p>
  
  <pre class="lang-java prettyprint-override"><code>//Base model, contains localized fields
  public class Restaurant extends LocalizedModel&lt;LocalizedRestaurantData&gt;{
  
  ...
  
  }
  
  //Abstract class to support localized fields for all my models
  @XmlRootElement
  public abstract class LocalizedModel&lt;T extends LocalizedData&gt; {
  
      private T en;
  
      public T getEn() {
          return en;
      }
      public void setEn(T en) {
          this.en = en;
      }
      ...
  }
  
  //Implementation of the localized fields for the restaurant class.
  @XmlRootElement
  public class LocalizedRestaurantData extends LocalizedData{
  
      protected String name;
      protected String address;
      ...
  }
  </code></pre>
  
  <p>This all works fine in my Jersey JSON web service, except for one thing: All the instances of the localized property <code>en</code> contain an extra field <code>type</code>:</p>
  
  <p><code>Restaurant</code> JSON:</p>
  
  <pre><code>{
  "en": {
          "type": "localizedRestaurantData",
          "address": "1234 Main St.",
          "name": "Tacos Folie"
      },
   ...
  }
  </code></pre>
  
  <p>This <code>type</code> field is undesired and undesirable especially since it seems to be also required by Jackson when parsing an object. I've added <code>@JsonIgnoreProperties({"type"})</code> in my code without success.</p>