Package com.fasterxml.jackson.databind.util

Examples of com.fasterxml.jackson.databind.util.ISO8601DateFormat


    {
        Calendar cal = new GregorianCalendar(2007, 8 - 1, 13, 19, 51, 23);
        cal.setTimeZone(TimeZone.getTimeZone("GMT"));
        cal.set(Calendar.MILLISECOND, 0);
        date = cal.getTime();
        df = new ISO8601DateFormat();
    }
View Full Code Here


public class JSONSerializerDeprecatedTest extends TestCase {

    public void test_() throws Exception {
        JSONSerializer ser = new JSONSerializer(new JSONSerializerMap());
       
        ser.setDateFormat(new ISO8601DateFormat());
        Assert.assertEquals(null, ser.getDateFormatPattern());
       
        ser.close();
    }
View Full Code Here

  /**
   * Builde default Jackson ObjectMapper
   */
  public static ObjectMapper build() {
    ObjectMapper mapper = new ObjectMapper();
    mapper.setDateFormat(new ISO8601DateFormat());
    return mapper;
  }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public Date deserialize(final JsonParser parser,
                            final DeserializationContext context) throws IOException {
        final DateFormat format = new ISO8601DateFormat();
        try {
            return format.parse(parser.getText());
        } catch (final ParseException pe) {
            throw new IOException(pe);
        }
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.util.ISO8601DateFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.