title: Handling referenced objects from JSON Objects
body: <p>I am using Jackson as a mapper for a REST Service. A sample json response is</p>
  
  <pre><code>{
     "id": 1,
     "name": "One fine name",
     "child": 1 //this is a primary key referencing a composite object
  }
  </code></pre>
  
  <p>Now, using Jackson to map this notation into POJOs, the class would probably look like the following</p>
  
  <pre><code>class Parent{
      protected Integer id;
      protected String name;
      protected Child child;
  
      //....
      //appropriate Getters and Setters
  }
  </code></pre>
  
  <p>But when Jackson is about to deserialize the object, it complains about converting an integer into the Child object. Any idea how to make Jackson understand that the value for the child field is a reference?</p>