title: Jackson - Wrapping a list of objects with root object
body: <p>My Controller returns a list of MyObj objects (using @ResponseBody)</p>
  
  <pre><code>public MyObj 
  {
     int a;
     int b;
  }
  </code></pre>
  
  <p>The return JSON looks like this:</p>
  
  <pre><code>[{"a":1,"b":2},{"a":2,"b":2}]
  </code></pre>
  
  <p>I would like to wrap this JSON so it will return something like:</p>
  
  <pre><code>{ "data": [{"a":1,"b":2},{"a":2,"b":2}]}
  </code></pre>
  
  <p>From what i read i need to enable SerializationConfig.Feature.WRAP_ROOT_VALUE or (?) use
  @JsonRootName("data") on top of my controller.</p>
  
  <p>Also tried the @XmlRootElement, nothing seems to work.
  Any idea what is the right way to wrap the list of objects with a root name?</p>