title: Equivalent of @JsonIgnore but that works only for xml field/property conversion using Jackson
body: <p>I have a class that I am serializing/deserializing from/to both JSON, XML using Jackson.</p>
  
  <pre><code>public class User {
      Integer userId;
      String name;
      Integer groupId;
  ...
  }
  </code></pre>
  
  <p>I want to ignore groupId when doing xml processing, so my XMLs won't include it:</p>
  
  <pre><code>&lt;User&gt;
   &lt;userId&gt;...&lt;/userId&gt;
   &lt;name&gt;...&lt;/name&gt;
  &lt;/User&gt;
  </code></pre>
  
  <p>But the JSONs will:</p>
  
  <pre><code>{
    "userId":"...",
    "name":"...",
    "groupId":"..."
  }
  </code></pre>
  
  <p>I know that @JsonIgnore will work in both, but I want to ignore it only in the xml.</p>
  
  <p>I know about the mix-in annotations that can be used to do this (<a href="https://stackoverflow.com/a/22906823/2487263">https://stackoverflow.com/a/22906823/2487263</a>), but I think there should be a simple annotation that does this, but cannot find it. Jackson documentation (at least for me) is not as good as I would like when trying to find these kind of things.</p>