title: Java - Jackson nested arrays
body: <p>Given the following data</p>
  
  <pre><code>{
     "version" : 1,
     "data" : [ [1,2,3], [4.5,6]]
  }
  </code></pre>
  
  <p>I tried the following definitions and used <code>ObjectMapper.readValue(jsonstring, Outer.class)</code> </p>
  
  <pre><code>class Outer {
    public int version;
    public List&lt;Inner&gt; data
  }
  
  class Inner {
     public List&lt;Integer&gt; intlist;
  }
  </code></pre>
  
  <p>I got:</p>
  
  <blockquote>
    <p>Can not deserialize instance of Inner out of START_ARRAY token"</p>
  </blockquote>
  
  <p>In the Outer class, if I say </p>
  
  <pre><code>List&lt;List&lt;Integer&gt; data;
  </code></pre>
  
  <p>then deserialization works. </p>
  
  <p>But in my code, the Outer and Inner classes have some business logic related methods and I want to retain the class stucture. </p>
  
  <p>I understand that the issue is that Jackson is unable to map the inner array to the 'Inner' class. Do I have to use the Tree Model in Jackson? Or is there someway I can still use the DataModel here ? </p>