title: Mapping nested JSON to a Java POJO
body: <p>I am having difficulties mapping a nested JSON response to a POJO using Jackson.  At the moment the values in the Users class return as null.</p>
  
  <p>JSON:</p>
  
  <pre><code>{
  "users": [
      {
          "username": "johnSmith123",
          "email": "johnSmith123@gmail.com",
          "birthday": "1989-10-23"
      }
  ]
  }
  </code></pre>
  
  <p>POJO:</p>
  
  <pre><code>public class Users {
  
    @JsonProperty("username")
    public String username;
    @JsonProperty("email")
    public String email;
    @JsonProperty("birthday")
    public String birthday;
  
  }
  </code></pre>
  
  <p>Controller method:</p>
  
  <pre><code>private ObjectMapper mapper = new ObjectMapper();
  
  ResponseEntity&lt;String&gt; response = restTemplate.exchange(
          accountUrl, HttpMethod.GET, entity, String.class);
  
  Users user = mapper.readValue(response.getBody(), Users.class);
  </code></pre>
  
  <p>How could I go about resolving this?</p>
  
  <p>Thanks</p>