title: com.fasterxml.jackson.databind.exc.MismatchedInputException: Can not deserialize instance of object out of START_ARRAY token - JAVA
body: <p>Getting the MismatchedInputException. Searched a lot of questions here but havent found a solution yet.</p>
  <p>Code:</p>
  <pre><code>import /path/to/file/Bars;
  List&lt;Bars&gt; barResults = null;
  public boolean validateData() throws IOException {
          boolean flag = false;
          try {
              if (Data.read() != -1) {
                  BufferedReader reader = new BufferedReader(new InputStreamReader(Data));
                  String line;
                  while ((line = reader.readLine()) != null) {
                      line = &quot;[{&quot; + line;
                      System.out.println(line);
                      ObjectMapper om = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
                      Bars ms = om.readValue(line, Bars.class);
                      System.out.println(ms);
                      break;
                  }
                  reader.close();
              }
          } catch (IOException e) {
              e.printStackTrace();
          }
          return flag;
      }
  </code></pre>
  <p>Json: //shorten for example</p>
  <pre><code>[{&quot;createdOn&quot;:1601058721310,&quot;lastUpdated&quot;:null,&quot;lastUpdatedBy&quot;:null,&quot;createdBy&quot;:null,&quot;appId&quot;:null,&quot;logical&quot;:&quot;N&quot;,&quot;calculationDateTime&quot;:1601058721310,&quot;mtaVersionNumber&quot;:null,&quot;storageRegionName&quot;:&quot;texas&quot;,&quot;createdOnDate&quot;:1601058721310,&quot;lastUpdatedDate&quot;:0}]
  </code></pre>
  <p>Output:</p>
  <pre><code>[{&quot;createdOn&quot;:1601058721310,&quot;lastUpdated&quot;:null,&quot;lastUpdatedBy&quot;:null,&quot;createdBy&quot;:null,&quot;appId&quot;:null,&quot;logical&quot;:&quot;N&quot;,&quot;calculationDateTime&quot;:1601058721310,&quot;mtaVersionNumber&quot;:null,&quot;storageRegionName&quot;:&quot;texas&quot;,&quot;createdOnDate&quot;:1601058721310,&quot;lastUpdatedDate&quot;:0}]
  com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `object` out of START_ARRAY token
   at [Source: (StringReader); line: 1, column: 1]
  </code></pre>
  <p>I am not sure what is causing this exception. When I start the application, i runs and reads the JSON fine..but throws exception.</p>