title: Jackson deserialize "" as an empty list
body: <p>I have a JSON string that marks empty lists as <code>""</code> instead of <code>[]</code>. So for example, if I have an object with no children, I'll receive a string like this:</p>
  
  <pre><code>{"id":13, "children":""}
  </code></pre>
  
  <p>I'd like to deserialize that to a Parent class, with children properly set to an empty list of children.</p>
  
  <pre><code>public class Parent {
  
      private Long id;
      private List&lt;Child&gt; children;
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public List&lt;Child&gt; getChildren() {
          return children;
      }
  
      public void setChildren(List&lt;Child&gt; children) {
          this.children = children;
      }
  }
  </code></pre>
  
  <p>For the above JSON string, I'd like an object that will have its <code>id</code> set to <code>13</code>, and the <code>children</code> set to a <code>new ArrayList&lt;Child&gt;()</code></p>
  
  <pre><code>Parent
      id &lt;- 13
      children &lt;- new ArrayList&lt;Child&gt;()
  </code></pre>
  
  <p>I would know how to use an annotation for the entire class</p>
  
  <pre><code>@JsonDeserialize(using = ParentDeserializer.class)
  public class Parent { 
      ...
  }
  </code></pre>
  
  <p>and then </p>
  
  <pre><code>public class ParentDeserializer extends JsonDeserializer&lt;Parent&gt; {
      public Parent deserialize(JsonParser parser, DeserializationContext context) {
          ...    
      }
  }
  </code></pre>
  
  <p>However, I'd like to solve a general problem of instantiating Lists properly from <code>""</code> strings:</p>
  
  <pre><code>public class Parent {
      ...
      // Can I get something like this?
      @JsonDeserialize(using = EmptyArrayDeserializer&lt;Child&gt;.class) 
      public void setChildren(List&lt;Child&gt; children) {
          this.children = children;
      }
  }
  </code></pre>
  
  <p>Can I get something like that?</p>