title: Suppress wrapper object when serializing Java object into JSON using Jackson
body: <p>I have a web service that returns a list as JSON. It uses Jackson to map a List of Java POJOs into JSON. The problem is that the JSON representation has a wrapper object around the array, and I just want the array. I.e., I'm getting this:</p>
  
  <pre><code>{"optionDtoList":[{...}, ..., {...}]}
  </code></pre>
  
  <p>when what I really want is this:</p>
  
  <pre><code>[{...}, ..., {...}]
  </code></pre>
  
  <p>I am serializing the Java List directly; I'm not wrapping the List with a wrapper object and serializing a wrapper object. It's Jackson that seems to be adding the JavaScript wrapper object.</p>
  
  <p>I assume there's some annotation I can use on the POJO to suppress the wrapper object but I'm not seeing it.</p>
  
  <p><strong>Constraints on solution</strong></p>
  
  <p>I'd like to fix this on the service side rather than peeling off the wrapper on the client. The client is a jQuery UI widget (the autocomplete widget, not that it matters) that expects a simple array and I don't want to modify the widget itself.</p>
  
  <p><strong>What I've tried</strong></p>
  
  <ul>
  <li>I tried replacing the List of Java POJOs with an array of Java POJOs and the result is the same.</li>
  <li>I tried <code>@JsonTypeInfo(use = Id.NONE)</code> thinking that that might suppress the wrapper, but it didn't.</li>
  </ul>