title: Jackson: JSON parsing for array of parent elements : Root name '' does not match expected ('List')
body: <p>I am getting the following exception after writing the below code. </p>
  
  <p><em>Caused by: com.fasterxml.jackson.databind.JsonMappingException: Root name 'Filing' does not match expected ('List') for type [collection type; class java.util.List, contains [simple type, class MasMonthlyReportDetail]]</em></p>
  
  <p><strong>JSON Object</strong></p>
  
  <pre><code>{
       "Filing":
      [
             {
                  "periodInfo":
                      {
                           "date": "06-05-2013",
                   "year": "2015",
                   "Month": "January"
  
                      },
              "employerInfo":
                  {
                   "name": "Y",
                   "place": "Y",
                   "country": "N",
  
                      },
                  "employeeInfo":
                      [
                           {
                                "name": "785-23-0370",                  
                    "dob": "05/25/1952",
  
                           }
                      ],
                  "messages": 
                  [
                       {
                    "defaultMessage" : "xx",
                    "messageType" : "yy",
                    "messageCode" : "102"
                   }
                  ]
            },
  
                 {
                  "periodInfo":
                      {
                           "date": "06-05-2013",
                   "year": "2015",
                   "Month": "January"
  
                      },
              "employerInfo":
                  {
                   "name": "Y",
                   "place": "Y",
                   "country": "N",
  
                      },
                  "employeeInfo":
                      [
                           {
                                "name": "785-23-0370",                  
                    "dob": "05/25/1952",
  
                           }
                      ],
                  "messages": 
                  [
                       {
                    "defaultMessage" : "xx",
                    "messageType" : "yy",
                    "messageCode" : "102"
                   }
                  ]
            }
      ]
  }
  </code></pre>
  
  <p><strong>Main Class</strong></p>
  
  <pre><code>ObjectMapper objectMapper = new ObjectMapper();        
  
  objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
  
  List&lt;MasMonthlyReportDetail&gt; lcd =  objectMapper.readValue(new File(filePath),new TypeReference&lt;List&lt;MasMonthlyReportDetail&gt;&gt;(){});
  </code></pre>
  
  <p><strong>MasMonthlyReportDetail.java</strong></p>
  
  <pre><code>@JsonRootName(value="Filing")
  
  public class MasMonthlyReportDetail {
  
      private PeriodInfo periodInfo;
      private EmployerInfo employerInfo;
      List&lt;EmployeeInfo&gt; employeeInfo;
      List&lt;Messages&gt; messages;
  
      public PeriodInfo getPeriodInfo() {
          return periodInfo;
      }
      public void setPeriodInfo(PeriodInfo periodInfo) {
          this.periodInfo = periodInfo;
      }
      public EmployerInfo getEmployerInfo() {
          return employerInfo;
      }
      public void setEmployerInfo(EmployerInfo employerInfo) {
          this.employerInfo = employerInfo;
      }
      public List&lt;EmployeeInfo&gt; getEmployeeInfo() {
          return employeeInfo;
      }
      public void setEmployeeInfo(List&lt;EmployeeInfo&gt; employeeInfo) {
          this.employeeInfo = employeeInfo;
      }
      public List&lt;Messages&gt; getMessages() {
          return messages;
      }
      public void setMessages(List&lt;Messages&gt; messages) {
          this.messages = messages;
      }
  
  }
  </code></pre>