title: How to define a generic list deserializer through annotations with Jackson?
body: <p>Let's say I have an object which has list properties:</p>
  
  <pre><code>public class Citizen {
      name
      List&lt;Tickets&gt; tickets
      List&lt;Fines&gt; fines
  }
  </code></pre>
  
  <p>I'd like to define a generic custom deserializer for lists through annotations:</p>
  
  <pre><code>public class Citizen {
      ...
      @JsonDeserializer(MyListDeserializer&lt;Tickets&gt;) // &lt;-- generic deserializer
      public void setTickets(List&lt;Tickets&gt; tickets) {
          this.tickets = tickets;
      }
  
      @JsonDeserializer(MyListDeserializer&lt;Fines&gt;) // &lt;-- how can I do that? 
      public void setFines(List&lt;Fines&gt; fines) {
          this.fines = fines;
      }
  }
  </code></pre>
  
  <p>I'm looking for a way to create a "generic" deserializer — one that would be able to deserialize both types of lists, similar to <a href="https://stackoverflow.com/questions/6704992/contextualdeserializer-for-mapping-json-to-different-types-of-maps-with-jackson/6714275">ContextualDeserializer for mapping JSON to different types of maps with Jackson</a>.</p>
  
  <p>The final purpose is to implement custom deserializing logic in <code>MyListDeserializer</code> to deserialize empty strings <code>""</code> as empty lists, but I'd like to know about a general approach, not just for empty strings.</p>