title: Jackson cannot convert empty string value to enum
body: <p>I am looking for a handy solution with Jackson (2.8) to filter out fields pointing to empty String value before/during deserialization: </p>
  
  <pre><code>@JsonInclude(JsonInclude.Include.NON_EMPTY)
  public class Guis {
  
  public enum Context {
      SDS,
      NAVIGATION
  }
  
  public enum Layer {
      Library,
      Status,
      Drivingdata
  }
  
  // client code
  
   String s = "{\"context\":\"\",\"layer\":\"Drivingdata\"}";
   ObjectMapper mapper = new ObjectMapper();
   Guis o = mapper.readValue(s, Guis.class);
  </code></pre>
  
  <p>Error </p>
  
  <pre><code> Exception in thread "main" com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not deserialize value of type cq.speech.rsi.api.Guis$Context from String "": value not one of declared Enum instance names: [SDS NAVIGATION] at [Source: {"context":"","layer":"Drivingdata"}; line: 1, column: 12] (through reference chain: cq.speech.rsi.api.Guis["context"])
  </code></pre>
  
  <p>What else I tried... 
  Ah this one</p>
  
  <pre><code>mapper.getDeserializationConfig().with(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
  </code></pre>
  
  <p>The error remains and apparently even googling around didn't help much... </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>set DeserializationFeature does not work as exemplified above. For me the solution was eventually to add this snippet:</p>
  
  <pre><code> mapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true)
  </code></pre>