title: RESTEasy + Jackson: how to exclude fields in the response?
body: <p>I'm migrating my Java web application from servlet-based to JAX-RS. Since I'm using Jboss I'll also use (by default) RESTEasy. </p>
  
  <p>In my servlets I use Jackson to serialize/deserialize JSON; Jackson allows me to filter programatically the inclusion/exclusion of fields, for example:</p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper().setVisibility(JsonMethod.FIELD, 
  Visibility.ANY);
  
  String[] ignorableFieldNames = { "id", "name" };
  
  FilterProvider filters = new SimpleFilterProvider().
  addFilter("f123",SimpleBeanPropertyFilter.serializeAllExcept(ignorableFieldNames));
  
  mapper.filteredWriter(filters).writeValueAsString(object);
  </code></pre>
  
  <p>RESTEasy provides Jackson support, but it seems that it is embedded transparently to the developer so I'm not able to get to the low-level to include/exclude fields. Is this feasible?</p>