title: Manage attributes inheritance with RESTeasy
body: <p>I'm using RESTeasy to convert a json from the payload to a POJO in the web server. I encounter a problem when one of those POJO member is generic.</p>
  
  <p>For example:</p>
  
  <pre><code>public class MainPOJO
  {
      private MyParentClass c;
  
      [...]
  }
  
  public class MyParentClass
  {
      [...]
  }
  
  public class MyFirstChildClass extends MyParentClass
  {
      private int number;
  
      [...]
  }
  
  public class MySecondChildClass extends MyParentClass
  {
      private boolean isTrue;
  
      [...]
  }
  </code></pre>
  
  <p>In the request payload (PUT) made by the client, you can found something like this json (notice that I send a MyFirstChildClass equivalent in json format in the "c" attribute):</p>
  
  <pre><code>{
      c: {number:10}
  }
  </code></pre>
  
  <p>Is there any way to tell RESTeasy that the property "c" in the MainPOJO can be either an instance of MyParentClass, MyFirstChildClass or MySecondChildClass?</p>
  
  <p>Currently, it just try to instanciate a MyParentClass new instance but throw an error saying that property, for exemple, "number" is not mark as ignorable. But I wish it could be more intelligent and instantiate an object from the right class in the tree according to the properties in the json.</p>
  
  <p>Is it possible?</p>
  
  <p>Thanks!</p>