@Test public void testToJson() { DateFormat dateFormat = new SimpleDateFormat(Constants.DATE_FORMAT_STR); String date = dateFormat.format(new Date()); JsonNodeFactory jsonNodeFactory = new JsonNodeFactory(true); JsonNode jsonNode = dateType.toJson(jsonNodeFactory, date); assertTrue(jsonNode.asText().equals(date)); }
@Override public JsonNode toJson(JsonNodeFactory factory, Object obj) { return factory.textNode(Constants.getDateFormat().format((Date) cast(obj))); }
DateType implements Type, Serializable { @Override public JsonNode toJson(JsonNodeFactory factory, Object obj) { return factory.textNode(Constants.getDateFormat().format((Date) cast(obj))); } }
DateType implements Type, Serializable { @Override public JsonNode toJson(JsonNodeFactory factory, Object obj) { return factory.textNode(Constants.getDateFormat().format((Date) cast(obj))); } private  DateType(); }
DateType implements Type, Serializable { @Override public JsonNode toJson(JsonNodeFactory factory, Object obj) { return factory.textNode(Constants.getDateFormat().format((Date) cast(obj))); } private  DateType(); @Deprecated static DateFormat getDateFormat(); @Override String getName(); @Override boolean supportsEq(); @Override boolean supportsOrdering(); @Override JsonNode toJson(JsonNodeFactory factory, Object obj); @Override Object fromJson(JsonNode node); @Override Object cast(Object obj); @SuppressWarnings({"rawtypes", "unchecked"}) @Override int compare(Object v1, Object v2); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
DateType implements Type, Serializable { @Override public JsonNode toJson(JsonNodeFactory factory, Object obj) { return factory.textNode(Constants.getDateFormat().format((Date) cast(obj))); } private  DateType(); @Deprecated static DateFormat getDateFormat(); @Override String getName(); @Override boolean supportsEq(); @Override boolean supportsOrdering(); @Override JsonNode toJson(JsonNodeFactory factory, Object obj); @Override Object fromJson(JsonNode node); @Override Object cast(Object obj); @SuppressWarnings({"rawtypes", "unchecked"}) @Override int compare(Object v1, Object v2); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Deprecated
    static final String DATE_FORMAT_STR; static final Type TYPE; static final String NAME; }