title: Marshalling collections when using XmlElementWrapper
body: <p>I have a collection on my class that uses @XmlElementWrapper to wrap the collection in a extra element.</p>
  
  <p>So, my class looks something like this:</p>
  
  <pre><code>class A {
    @XmlElement(name = "bee")
    @XmlElementWrapper
    public List&lt;B&gt; bees;
  }
  </code></pre>
  
  <p>And my XML then looks something like:</p>
  
  <pre><code>&lt;a&gt;
    &lt;bees&gt;
      &lt;bee&gt;...&lt;/bee&gt;
      &lt;bee&gt;...&lt;/bee&gt;
    &lt;/bees&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>Great, this is what I wanted. However, when I try and marshall into JSON, I get this:</p>
  
  <pre><code>{
    "bees": {
      "bee": [
        ....
      ]
    }
  }
  </code></pre>
  
  <p>And I don't want that extra "bee" key there.</p>
  
  <p>Is it possible to somehow have MOXy ignore the XmlElement part when doing this marshalling? because I still need the name to be "bees" and not "bee", and I don't want both.</p>
  
  <p>I'm using MOXy 2.4.1 and javax.persistence 2.0.0.</p>