title: Do not serialize subtype properties with Jackson in Spring MVC 3
body: <p>I am using Spring MVC with a controller like this:</p>
  
  <pre><code>@RequestMapping(value = "/list", method = RequestMethod.GET, produces = "application/json")
  public @ResponseBody List&lt;Service&gt; list() {
  return services.list();
  }
  </code></pre>
  
  <p>The model is like this:</p>
  
  <pre><code>public class Service {
   private User user;
   ...
  }
  
  public class User {
   private String name;
   ...
  }
  
  public class ExtendedUser extends User {
   private Location location;
   ...
  }
  </code></pre>
  
  <p>For sure, an object of type ExtendedUser is created in the application and set in Service. When the controller /list answer the request, an object of type ExtendedUser is serialized despite the reference in Service class is User. I would like to know if there is some way with annotations to only serialize supertype (the referenced type) and avoid the subtype propierties.</p>
  
  <p>Taking the example into account, I want a JSON without the location property to be returned.</p>
  
  <p>Thanks in advance</p>