title: How does Jackson deserialize json into a generic type?
body: <p>class Person:</p>
  
  <pre><code>@Data
  public class Person&lt;T extends Parent&gt; implements Serializable {
      private static final long serialVersionUID = 7822965786010192978L;
  
      private static final ObjectMapper objectMapper = new ObjectMapper();  
      private String id;    
      private T people; // change (String peopleInfo) to object extends Parent after read data from database
      private String peopleInfo; // change (T people) to string and save in the dataBase as an string
  
      @SneakyThrows
      public void setPeople(T people) {
          this.people = people;
          peopleInfo = objectMapper.writeValueAsString(people);
      }
  
      @SneakyThrows
      public void setPeopleInfo(String peopleInfo) {
          this.peopleInfo = peopleInfo;
          if (!Strings.isNullOrEmpty(peopleInfo)) {
              people = objectMapper.readValue(peopleInfo, new TypeReference&lt;T&gt;() {});
          }
      }
  }
  </code></pre>
  
  <p>class Parent:</p>
  
  <pre><code>@Data
  public class Parent implements Serializable {
      private static final long serialVersionUID = 2092353331893381153L;
      private String name;
  }
  </code></pre>
  
  <p>class Child:</p>
  
  <pre><code>@Data
  public class Child extends Parent {
      private static final long serialVersionUID = 3318503314202792570L;
      private String pocketMoney;
  }
  </code></pre>
  
  <p>and the test function: I want to save the <code>persnInfo</code> to the database as <code>String</code> and change this <code>string</code> to an object <code>people</code> automatically after reading data from database.</p>
  
  <pre><code>@Test
  public void testReadData() throws Exception {
      Child child = new Child();
      child.setName("_child");
      child.setPocketMoney("10$");
  
      Person&lt;Child&gt; person = new Person&lt;&gt;();
      person.setId("1");
      person.setPeople(child);
  
      // assume this json was read from database
      String json = person.getPeopleInfo();
      System.out.println(json);
  
      Person&lt;Child&gt; readPerson = new Person&lt;&gt;();
      readPerson.setId("1");
      readPerson.setPeopleInfo(json);
  
      Child readChild = readPerson.getPeople();
      System.out.println(readChild.getPocketMoney());
  }
  </code></pre>
  
  <p>The error happened:</p>
  
  <blockquote>
    <p>com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "pocketMoney" (class pers.test.common.objmapper.Parent), not marked as ignorable (one known property: "name"])</p>
    
    <p>at [Source: {"name":"_child","pocketMoney":"10$"}; line: 1, column: 33] (through reference chain: pers.test.common.objmapper.Parent["pocketMoney"])</p>
    
    <p>at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)</p>
  </blockquote>
  
  <p>I have no idea to solve this, anyone can help me make it pass without changing the <code>testReadData()' but change the model</code>People`.</p>