title: java.text.ParseException: Unparseable date "Fri Sep 12 23:22:46 IST 2014"
body: <p>I am using jackson mapper to map the json request to an java object directly. To map the date i am using CustomDateSerializer and CustomDateDeSerializer in the getter and setter respectively.</p>
  
  <pre><code>public class CustomJsonDateSerializer extends JsonSerializer&lt;Date&gt; {
      @Override
      public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
          SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
          String dateString = simpleDateFormat.format(date);
          jsonGenerator.writeString(dateString);
      }
  }
  
  
  public class CustomJsonDateDeserializer extends JsonDeserializer&lt;Date&gt; {
      @Override
      public Date deserialize(JsonParser jsonparser,
                              DeserializationContext deserializationcontext) throws IOException {
          SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
          String date = jsonparser.getText();
          try {
              return format.parse(date);
          } catch (ParseException e) {
              throw new RuntimeException(e);
          }
      }
  }
  </code></pre>
  
  <p>my getter and setter in the model</p>
  
  <pre><code>@JsonSerialize(using=CustomJsonDateSerializer.class)
      public Date getBirthDate() {
          return birthDate;
      }
  @JsonDeserialize(using = CustomJsonDateDeserializer.class)
  public void setBirthDate(Date birthDate) {
      this.birthDate = birthDate;
  }
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>Could not read JSON: java.text.ParseException: Unparseable date: "Fri Sep 12 23:22:46 IST 2014" 
  </code></pre>
  
  <p>Can any one help me fixing this..</p>