title: How do I parse a root JSON Array with restassured?
body: <p>I see that I can do the following with restassured.  Given JSON:</p>
  
  <pre><code>{"locationId"=456,"name"="Home"}
  </code></pre>
  
  <p>I can get an object representing that json like this:</p>
  
  <pre><code>Location location = given().headers(headers).when().expect().statusCode(200).get(getUrl(urlQualifier)).as(Location.class);
  </code></pre>
  
  <p>How do I parse this JSON is I receive a root array of my Location objects in JSON.  So, given this JSON:</p>
  
  <pre><code>[{"locationId"=1,name="Home"},{"locationId"=2,name="Work"}]
  </code></pre>
  
  <p>I want to parse out a List object.  The following of course is a compile error, but it demonstrates what I am trying to do:</p>
  
  <pre><code>List&lt;Location&gt; list = given().headers(headers).when().expect().statusCode(200).get(getUrl(urlQualifier)).as((List&lt;Location&gt;).class);
  </code></pre>