@Override protected java.util.Date _parseDate(JsonParser p, DeserializationContext ctxt) throws IOException { if (_customFormat != null) { if (p.hasToken(JsonToken.VALUE_STRING)) { String str = p.getText().trim(); if (str.length() == 0) { return (Date) getEmptyValue(ctxt); } synchronized (_customFormat) { try { return _customFormat.parse(str); } catch (ParseException e) { return (java.util.Date) ctxt.handleWeirdStringValue(handledType(), str, "expected format \"%s\"", _formatString); } } } } return super._parseDate(p, ctxt); } }
@Override protected java.util.Date _parseDate(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if (_customFormat != null && jp.getCurrentToken() == JsonToken.VALUE_STRING) { String str = jp.getText().trim(); if (str.length() == 0) { return (Date) getEmptyValue(); } synchronized (_customFormat) { try { return _customFormat.parse(str); } catch (ParseException e) { throw new IllegalArgumentException("Failed to parse Date value '"+str +"' (format: \""+_formatString+"\"): "+e.getMessage()); } } } return super._parseDate(jp, ctxt); } }
@Override protected java.util.Date _parseDate(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if (_customFormat != null && jp.getCurrentToken() == JsonToken.VALUE_STRING) { String str = jp.getText().trim(); if (str.length() == 0) { return (Date) getEmptyValue(); } synchronized (_customFormat) { try { return _customFormat.parse(str); } catch (ParseException e) { throw new IllegalArgumentException("Failed to parse Date value '"+str +"' (format: \""+_formatString+"\"): "+e.getMessage()); } } } return super._parseDate(jp, ctxt); } }
return super._parseDate(jp, ctxt);
return super._parseDate(jp, ctxt);
@Override protected java.util.Date _parseDate(JsonParser p, DeserializationContext ctxt) throws IOException { if (_customFormat != null) { if (p.hasToken(JsonToken.VALUE_STRING)) { String str = p.getText().trim(); if (str.length() == 0) { return (Date) getEmptyValue(ctxt); } synchronized (_customFormat) { try { return _customFormat.parse(str); } catch (ParseException e) { return (java.util.Date) ctxt.handleWeirdStringValue(handledType(), str, "expected format \"%s\"", _formatString); } } } } return super._parseDate(p, ctxt); } }
return super._parseDate(p, ctxt);