title: Jackson Custom String to Date Serializer
body: <p>I am trying to make Jackson to parse String to Date with given format. I came up with the following code for now: </p>
  
  <pre><code>@JsonIgnoreProperties(ignoreUnknown = true)
  public class EventData implements Serializable {
  
      private transient SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
  
      @JsonSerialize(using = StringToDateSerializer.class, as = Date.class)
      private Date eventStart;
  
      public class StringToDateSerializer extends JsonSerializer&lt;String&gt; {
  
          @Override
          public void serialize(String tmpString,
                                JsonGenerator jsonGenerator,
                                SerializerProvider serializerProvider)
                  throws IOException, JsonProcessingException {
              try {                
                  jsonGenerator.writeObject(formatter.parse(tmpString));
              } catch (ParseException e) {
  
              }
          }
      }
  }
  </code></pre>
  
  <p>But my only field eventStart always get populated with NULL. Also, it does not stops on breakpoint inside try/catch block as if it is never been invoked. The other (non custom) fields are populated fine.
  What I am doing wrong? Thanks</p>