title: How do you handle deserializing empty string into an Enum?
body: <p>I am trying to submit a form from Ext JS 4 to a Spring 3 Controller using JSON. I am using Jackson 1.9.8 for the serialization/deserialization using Spring's built-in Jackson JSON support. </p>
  
  <p>I have a status field that is initially null in the Domain object for a new record. When the form is submitted it generates the following json (scaled down to a few fields)</p>
  
  <pre><code>{"id":0,"name":"someName","status":""}
  </code></pre>
  
  <p>After submitted the following is seen in the server log</p>
  
  <pre><code>"nested exception is org.codehaus.jackson.map.JsonMappingException: Can not construct instance of com.blah.domain.StatusEnum from String value '': value not one of the declared Enum instance names"
  </code></pre>
  
  <p>So it appears that Jackson is expecting a valid Enum value or no value at all including an empty string. How do I fix this whether it is in Ext JS, Jackson or Spring? </p>
  
  <p>I tried to create my own ObjectMapper such as</p>
  
  <pre><code>public class MyObjectMapper extends Object Mapper {
      public MyObjectMapper() {
          configure(DeserializationConfig.Feature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true);
      }
  }
  </code></pre>
  
  <p>and send this as a property to MappingJacksonMappingView but this didn't work. I also tried sending it in to MappingJacksonHttpMessageConverter but that didn't work. Side question: Which one should I be sending in my own ObjectMapper?</p>
  
  <p>Suggestions?</p>