title: How to deserialize a JSON array with no name, using RestAssured?
body: <p>Hy, I ran into a bit of an issue when trying to deserialize an API Response using RestAssured. The response I get back from the server is in the form of an array - an array of Genre objects - but the array has no name:</p>
  <pre><code>[
      {
          &quot;_id&quot;: &quot;5ff71f94a76e49001374c84a&quot;,
          &quot;name&quot;: &quot;world&quot;,
          &quot;__v&quot;: 0
      }
  ]
  </code></pre>
  <p>I have an API that returns a single genre object.</p>
  <p>I created a class for deserializing the single Genre object.</p>
  <pre><code>// class used for deserializing Genre object response
  
  public class Genre {
  
      public String _id;
      public String name;
      public int __v;
  }
  </code></pre>
  <p>and this class for deserializing the response with the array</p>
  <pre><code>// class used for deserializing Genres array response
  
  public class Genres {
  
      public List&lt;Genre&gt; genres;
  }
  </code></pre>
  <p>RestAssured is expecting me to deserialize the response in the following format:</p>
  <pre><code>GenresResponse genresResponse = response.getBody().as(GenresResponse.class);
  genreId = genresResponse.genres.get(0)._id;
  </code></pre>
  <p>Due to the fact that the array response does not have any name properties, the Array deserialization will fail with the following error:</p>
  <pre><code>com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `apiEngine.models.responses.GenresResponse` out of START_ARRAY token
   at [Source: (String)&quot;[{&quot;_id&quot;:&quot;5ff72762a76e49001374c853&quot;,&quot;name&quot;:&quot;SciFi&quot;,&quot;__v&quot;:0}]&quot;; line: 1, column: 1]
  </code></pre>
  <p>I am using the following dependency for serialization and deserialization:</p>
  <pre><code>&lt;!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
      &lt;version&gt;2.10.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>Is there any way I can deserialize the response which contains the Array of Genres?</p>