title: How to extract List of objects from ResponseEntity?
body: <p>This is my get API returning list of employees.</p>
  
  <pre><code>@GET
  @Produces(MediaType.APPLICATION_JSON)
  @Path("/get")
  public List&lt;Employee&gt; getEmployee() {
      return employeeFacade.getAllEmployee();
  }
  </code></pre>
  
  <p>I want to extract the <code>Employee</code> object from <code>ResponseEntity&lt;String&gt;</code>. </p>
  
  <pre><code>RestTemplate restTemplate = new RestTemplate();
  HttpHeaders headers = new HttpHeaders();
  headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
  //headers.setContentType(MediaType.APPLICATION_JSON);
  
  Employee employee = new Employee();
  
  HttpEntity&lt;Employee&gt; entity = new HttpEntity&lt;Employee&gt;(employee, headers);
  ResponseEntity&lt;String&gt; result = restTemplate.exchange(uri, HttpMethod.GET, entity, String.class);
  
  System.out.println("result:" + result);
  </code></pre>
  
  <p><strong>How to make this work ?</strong></p>