@Override public Calendar deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Date d = _parseDate(jp, ctxt); if (d == null) { return null; } if (_calendarClass == null) { return ctxt.constructCalendar(d); } try { Calendar c = _calendarClass.newInstance(); c.setTimeInMillis(d.getTime()); return c; } catch (Exception e) { throw ctxt.instantiationException(_calendarClass, e); } } }
add(new StdDeserializer.BigIntegerDeserializer()); add(new CalendarDeserializer()); add(new DateDeserializer()); add(new CalendarDeserializer(GregorianCalendar.class), GregorianCalendar.class); add(new StdDeserializer.SqlDateDeserializer());
add(new StdDeserializer.BigIntegerDeserializer()); add(new CalendarDeserializer()); add(new DateDeserializer()); add(new CalendarDeserializer(GregorianCalendar.class), GregorianCalendar.class); add(new StdDeserializer.SqlDateDeserializer());
@Override public Calendar deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Date d = _parseDate(jp, ctxt); if (d == null) { return null; } if (_calendarClass == null) { return ctxt.constructCalendar(d); } try { Calendar c = _calendarClass.newInstance(); c.setTimeInMillis(d.getTime()); return c; } catch (Exception e) { throw ctxt.instantiationException(_calendarClass, e); } } }
add(new StdDeserializer.BigIntegerDeserializer()); add(new CalendarDeserializer()); add(new DateDeserializer()); add(new CalendarDeserializer(GregorianCalendar.class), GregorianCalendar.class); add(new StdDeserializer.SqlDateDeserializer());
@Override public Calendar deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Date d = _parseDate(jp, ctxt); if (d == null) { return null; } if (_calendarClass == null) { return ctxt.constructCalendar(d); } try { Calendar c = _calendarClass.newInstance(); c.setTimeInMillis(d.getTime()); return c; } catch (Exception e) { throw ctxt.instantiationException(_calendarClass, e); } } }
add(new StdDeserializer.BigIntegerDeserializer()); add(new CalendarDeserializer()); add(new DateDeserializer()); add(new CalendarDeserializer(GregorianCalendar.class), GregorianCalendar.class); add(new StdDeserializer.SqlDateDeserializer());
@Override public Calendar deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Date d = _parseDate(jp, ctxt); if (d == null) { return null; } if (_calendarClass == null) { return ctxt.constructCalendar(d); } try { Calendar c = _calendarClass.newInstance(); c.setTimeInMillis(d.getTime()); return c; } catch (Exception e) { throw ctxt.instantiationException(_calendarClass, e); } } }