title: Aggregate all the errors while mapping json to java object using Jackson
body: <p>I'm trying to map a JSON string to a Java Object using Jackson ObjectMapper. If there is a mapping error, Jackson throws an exception when it first encounters the error. Is there a way to ask the ObjectMapper to map all the field while collecting the errors, and return all possible errors together?</p>
  
  <p>The Java class</p>
  
  <pre><code>public class Test {
      public int field1;
      public int field2;
      public Test() {}
  }
  </code></pre>
  
  <p>Mapper Code snippet</p>
  
  <pre><code>String json = "{\"field1\":field, \"field2\":anotherField}";
  Test test = new ObjectMapper().readValue(json, Test.class);
  </code></pre>
  
  <p>The above code fails when it tries to parse 'field' to int, and doesn't check for remaining fields. However, the in the code, neither field1 nor field2 can be parsed. Is there a way to get all the potential errors at once, so I don't have to fix 1 error at a time?</p>