title: Trouble with understanding exception: "Cannot deserialize instance of `java.lang.String` out of START_OBJECT token" using ObjectMapper in Jackson
body: <p>I cannot properly convert a <code>JSON Object</code> into <code>POJO</code>. I kind of understand where is the problem, but can't figure out, how to deal with it.</p>
  <p>Here's all specific data to understand the issue:</p>
  <p><code>JSONObject</code> which I try to deserialize (understanding the values names isn't key to understand the problem):</p>
  <pre><code>[{&quot;name&quot;:&quot;Rafał&quot;,&quot;description&quot;:&quot;Przykładowy opis profilu&quot;,&quot;location&quot;:&quot;Lublin&quot;,&quot;interests&quot;:[{&quot;0&quot;:&quot;Gry komputerowe&quot;,&quot;1&quot;:&quot;Muzyka&quot;,&quot;2&quot;:&quot;Siłownia&quot;}],&quot;age&quot;:24,&quot;rowid&quot;:2,&quot;username&quot;:&quot;lenivius&quot;}]
  </code></pre>
  <p>My <code>POJO</code> class:</p>
  <pre><code>public class Users {
      private int rowid = 0, age;
      private String name, username, e_mail, password, description, location;
      private List&lt;String&gt; interests;
  
      public Users() {
  
      }
  
      public Users(int rowid, int age, String name, String username, String e_mail, String password, String description, String location, List&lt;String&gt; interests) {
          this.setRowid(rowid);
          this.setAge(age);
          this.setName(name);
          this.setUsername(username);
          this.setE_mail(e_mail);
          this.setPassword(password);
          this.setDescription(description);
          this.setLocation(location);
          this.setInterests(interests);
      }
  
      public int getRowid() {
          return rowid;
      }
  
      public int getAge() {
          return age;
      }
  
      public String getName() {
          return name;
      }
  
      public String getUsername() {
          return username;
      }
  
      public String getE_mail() {
          return e_mail;
      }
  
      public String getPassword() {
          return password;
      }
  
      public String getDescription() {
          return description;
      }
  
      public String getLocation() {
          return location;
      }
  
      public void setRowid(int rowid) {
          this.rowid = rowid;
      }
  
      public void setAge(int age) {
          this.age = age;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
      public void setE_mail(String e_mail) {
          this.e_mail = e_mail;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
      public void setLocation(String location) {
          this.location = location;
      }
  
      public List&lt;String&gt; getInterests() {
          return interests;
      }
  
      public void setInterests(List&lt;String&gt; interests) {
          this.interests = interests;
      }
  }
  </code></pre>
  <p>And lastly code line which causes the exception to happen:</p>
  <pre><code>resultUsers = objectMapper.readValue(responseString, Users[].class);
  </code></pre>
  <p>I can also post full exception message:</p>
  <blockquote>
  <p>com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of <code>java.lang.String</code> out of START_OBJECT token
  at [Source: (String)&quot;[{&quot;name&quot;:&quot;Rafał&quot;,&quot;description&quot;:&quot;Przykładowy opis profilu&quot;,&quot;location&quot;:&quot;Lublin&quot;,&quot;interests&quot;:[{&quot;0&quot;:&quot;Gry komputerowe&quot;,&quot;1&quot;:&quot;Muzyka&quot;,&quot;2&quot;:&quot;Siłownia&quot;}],&quot;age&quot;:24,&quot;rowid&quot;:2,&quot;username&quot;:&quot;lenivius&quot;}]&quot;; line: 1, column: 92] (through reference chain: java.lang.Object[][0]-&gt;com.example.loveterests.Users[&quot;interests&quot;]-&gt;java.util.ArrayList[0])</p>
  </blockquote>
  <p>If I understand the problem correctly, then <code>Jackson</code> needs a list of <code>String</code> objects to properly convert <code>JSON</code> into <code>POJO</code>, but inside &quot;interests&quot; key there is a <code>JSON Array</code>, and that's probably where all the is the problem.</p>