title: Child object json string to Parent object
body: <p>String JSON inheritance child to the parent object  </p>
  
  <p>Base class of code </p>
  
  <pre><code>public class A {
  
      int x;
  
      int y;
  
      int z;
  
      public A(int x, int y, int z) {
  
          this.x = x;
  
          this.y = y;
  
          this.z = z;
  
      }
  
  }
  </code></pre>
  
  <p>Child class  : </p>
  
  <pre><code>public class B  extends A {
     int i;
     int j ;
  
     public B(int x, int y, int z, int i, int j) {
  
         this.i = i;
  
         this.j = j;
  
         super(x,y,z);
  
     }
  
  }
  
  B b = new B();
  // converting the obj to class obj 
  String s = new ObjectMapper().writeValueAsString(b);
  
  A a = new  ObjectMapper().convertValue(s, A.class);
  
  B bb = (B) b;
  </code></pre>
  
  <p>I am not able to achieve this.
  As a parent class doesn't have all the fields.</p>
  
  <p>There is a drop in the attribute values </p>
  
  <p>Object A will miss some values and not able to convert 
  the parent obj to child obj.</p>
  
  <p>How we can convert this properly 
  Should we add  @JsonProperty</p>