title: How to handle that json response in java?
body: <p>I have created a rest web service and a client. Client is calling a function to get all playlists. Service is returning a List of objects(Playlist). How to save this response on a client?</p>
  
  <p>Resource class:</p>
  
  <pre><code>@GET
  public List&lt;Playlist&gt; getAllPlaylists(){
      return playlistservice.getAllPlaylists();
  }
  </code></pre>
  
  <p>Service class: </p>
  
  <pre><code>    public List&lt;Playlist&gt; getAllPlaylists(){
      return new ArrayList&lt;Playlist&gt;(playlists.values());
  }
  </code></pre>
  
  <p>Client code(im getting error here)</p>
  
  <pre><code>List&lt;Playlist&gt; a = new ArrayList&lt;Playlist&gt;();
  
                          a = playlistsTarget
                                  .request()
                                  .get(List&lt;Playlist&gt;.class); // error here
  </code></pre>
  
  <p>How to save this response to List of playlist?</p>