public static JsonDeserializer<?> find(Class<?> rawType, String clsName) { if (_classNames.contains(clsName)) { // Start with the most common type if (rawType == Calendar.class) { return new CalendarDeserializer(); } if (rawType == java.util.Date.class) { return DateDeserializer.instance; } if (rawType == java.sql.Date.class) { return new SqlDateDeserializer(); } if (rawType == Timestamp.class) { return new TimestampDeserializer(); } if (rawType == GregorianCalendar.class) { return new CalendarDeserializer(GregorianCalendar.class); } } return null; }
@Override public java.sql.Date deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { Date d = _parseDate(p, ctxt); return (d == null) ? null : new java.sql.Date(d.getTime()); } }
public static JsonDeserializer<?> find(Class<?> rawType, String clsName) { if (_classNames.contains(clsName)) { // Start with the most common type if (rawType == Calendar.class) { return new CalendarDeserializer(); } if (rawType == java.util.Date.class) { return DateDeserializer.instance; } if (rawType == java.sql.Date.class) { return new SqlDateDeserializer(); } if (rawType == Timestamp.class) { return new TimestampDeserializer(); } if (rawType == GregorianCalendar.class) { return new CalendarDeserializer(GregorianCalendar.class); } } return null; }
public static JsonDeserializer<?> find(Class<?> rawType, String clsName) { if (_classNames.contains(clsName)) { // Start with the most common type if (rawType == Calendar.class) { return new CalendarDeserializer(); } if (rawType == java.util.Date.class) { return DateDeserializer.instance; } if (rawType == java.sql.Date.class) { return new SqlDateDeserializer(); } if (rawType == Timestamp.class) { return new TimestampDeserializer(); } if (rawType == GregorianCalendar.class) { return new CalendarDeserializer(GregorianCalendar.class); } } return null; }
public static JsonDeserializer<?> find(Class<?> rawType, String clsName) { if (_classNames.contains(clsName)) { // Start with the most common type if (rawType == Calendar.class) { return new CalendarDeserializer(); } if (rawType == java.util.Date.class) { return DateDeserializer.instance; } if (rawType == java.sql.Date.class) { return new SqlDateDeserializer(); } if (rawType == Timestamp.class) { return new TimestampDeserializer(); } if (rawType == GregorianCalendar.class) { return new CalendarDeserializer(GregorianCalendar.class); } } return null; }
public static JsonDeserializer<?> find(Class<?> rawType, String clsName) { if (_classNames.contains(clsName)) { // Start with the most common type if (rawType == Calendar.class) { return new CalendarDeserializer(); } if (rawType == java.util.Date.class) { return DateDeserializer.instance; } if (rawType == java.sql.Date.class) { return new SqlDateDeserializer(); } if (rawType == Timestamp.class) { return new TimestampDeserializer(); } if (rawType == GregorianCalendar.class) { return new CalendarDeserializer(GregorianCalendar.class); } } return null; }
public static StdDeserializer<?>[] all() { return new StdDeserializer[] { new CalendarDeserializer(), // for nominal type of java.util.Calendar new DateDeserializer(), /* 24-Jan-2010, tatu: When including type information, we may * know that we specifically need GregorianCalendar... */ new CalendarDeserializer(GregorianCalendar.class), new SqlDateDeserializer(), new TimestampDeserializer(), new TimeZoneDeserializer() }; }
@Override protected SqlDateDeserializer withDateFormat(DateFormat df, String formatString) { return new SqlDateDeserializer(this, df, formatString); }
@Override protected SqlDateDeserializer withDateFormat(DateFormat df, String formatString) { return new SqlDateDeserializer(this, df, formatString); }
@Override protected SqlDateDeserializer withDateFormat(DateFormat df, String formatString) { return new SqlDateDeserializer(this, df, formatString); }
public static StdDeserializer<?>[] all() { return new StdDeserializer[] { new CalendarDeserializer(), // for nominal type of java.util.Calendar new DateDeserializer(), /* 24-Jan-2010, tatu: When including type information, we may * know that we specifically need GregorianCalendar... */ new CalendarDeserializer(GregorianCalendar.class), new SqlDateDeserializer(), new TimestampDeserializer(), new TimeZoneDeserializer() }; }
@Override public java.sql.Date deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Date d = _parseDate(jp, ctxt); return (d == null) ? null : new java.sql.Date(d.getTime()); } }
@Override public java.sql.Date deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Date d = _parseDate(jp, ctxt); return (d == null) ? null : new java.sql.Date(d.getTime()); } }
@Override public java.sql.Date deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { Date d = _parseDate(p, ctxt); return (d == null) ? null : new java.sql.Date(d.getTime()); } }
@Override protected SqlDateDeserializer withDateFormat(DateFormat df, String formatString) { return new SqlDateDeserializer(this, df, formatString); }
@Override public java.sql.Date deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { if (p.hasToken(JsonToken.VALUE_EMBEDDED_OBJECT)) { Object embedded = p.getEmbeddedObject(); if (embedded instanceof Timestamp) { return new java.sql.Date(((Timestamp) embedded).dateValue().getTime()); } } return super.deserialize(p, ctxt); } }
@Override protected SqlDateDeserializer withDateFormat(DateFormat df, String formatString) { return new SqlDateDeserializer(this, df, formatString); }
@Override public java.sql.Date deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { Date d = _parseDate(jp, ctxt); return (d == null) ? null : new java.sql.Date(d.getTime()); } }
@Override protected SqlDateDeserializer withDateFormat(DateFormat df, String formatString) { return new SqlDateDeserializer(this, df, formatString); }
@Override public java.sql.Date deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { Date d = _parseDate(jp, ctxt); return (d == null) ? null : new java.sql.Date(d.getTime()); } }