title: Getting exception as Cannot deserialize value of type `response.BookingIDList` from Array value (token `JsonToken.START_ARRAY`)
body: <pre><code>I am trying to deserialize the response using POJO classes.
  My sample response is;
  </code></pre>
  <p>[
  {
  &quot;bookingid&quot;: 4
  },
  {
  &quot;bookingid&quot;: 9
  },
  {
  &quot;bookingid&quot;: 3
  },
  {
  &quot;bookingid&quot;: 2
  },
  {
  &quot;bookingid&quot;: 1
  },
  {
  &quot;bookingid&quot;: 6
  },
  {
  &quot;bookingid&quot;: 5
  },
  {
  &quot;bookingid&quot;: 10
  },
  {
  &quot;bookingid&quot;: 8
  },
  {
  &quot;bookingid&quot;: 7
  }
  ]</p>
  <pre><code>    public class BookingID
      {
          private int bookingid;
      
          public void setId(int bookingid) {
              this.bookingid = bookingid;
          }
      
          public int getId() {
              return bookingid;
          }
      
          @Override
          public String toString() {
              return &quot;BookingID{&quot; +
                      &quot;bookingid=&quot; + bookingid +
                      '}';
          }
  
  }
  </code></pre>
  <p><strong>BookingList class</strong></p>
  <pre><code>import java.util.List;
  
  public class BookingIDList
  {
      private List&lt;BookingID&gt; bookingList;
  
      public void setBookingList(List&lt;BookingID&gt; bookingList) {
          this.bookingList = bookingList;
      }
  
      public List&lt;BookingID&gt; getBookingList() {
          return bookingList;
      }
  
      @Override
      public String toString() {
          return &quot;BookingIDList{&quot; +
                  &quot;bookingList=&quot; + bookingList +
                  '}';
      }
  }
  
  
  **I am now trying to deserialize** 
  </code></pre>
  <p>Response response= given(requestSpecificationGenerator.GetRequestSpecification()).get(&quot;/booking&quot;);
  System.out.println(&quot;All bookings are as follows \n&quot;+response.asPrettyString());</p>
  <pre><code>    BookingIDList bookingIDList = response.getBody().as(BookingIDList.class);
  **getting the exception here as**
  com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `response.BookingIDList` from Array value (token `JsonToken.START_ARRAY`)
   at [Source: (String)&quot;[
      {
          &quot;bookingid&quot;: 4
      },
      {
          &quot;bookingid&quot;: 9
      },
      {
          &quot;bookingid&quot;: 3
      },
      {
          &quot;bookingid&quot;: 2
      },
      {
          &quot;bookingid&quot;: 1
      },
      {
          &quot;bookingid&quot;: 6
      },
      {
          &quot;bookingid&quot;: 5
      },
      {
          &quot;bookingid&quot;: 10
      },
      {
          &quot;bookingid&quot;: 8
      },
      {
          &quot;bookingid&quot;: 7
      }
  ]&quot;; line: 1, column: 1]
      at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
  </code></pre>