title: Jackson and multiple interface inheritance
body: <p>I'm trying to implement json serialization of the single entity to different views according to used interface.
  For example we have:</p>
  
  <pre><code>public interface BookBrief {
    long getId();
    String getTitle();
  }
  
  public interface BookPreview {
    long getId();
    String getAnnotation();
  }
  
  public class Book implements BookBrief, BookPreview {
  
    // class fields here
  
    public long getId() {...}
  
    public String getTitle() {...}
  
    public String getText() {...}
  
    public String getAnnotation() {...}
  
    // setters here
  }
  
  
  // service which results is serialized to json in Spring MVC controllers
  
  public interface BookService {
  
    List&lt;? extends BookBrief&gt; getBooks();
  
    BookPreview getBookPreview(long id);
  
    Book getBook(long id);
  }
  </code></pre>
  
  <p>BookService implementation always returns Book class (with unused fields set to null).
  To serialize interfaces I tried to use annotation @JsonSerialize(as = Interface.class) for each, 
  but for all interfaces jackson always use only the first one listed in 'implements' expression.
  Is there a way to configure jackson like I need? Or may be there is a better solution?</p>