All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fasterxml.jackson.jr.extension.javatime.JacksonJrJavaTimeExtension Maven / Gradle / Ivy

Go to download

Jackson-jr extension that adds support for Java 8 Date/Time value types such as `java.time.LocalDateTime`

The newest version!
package com.fasterxml.jackson.jr.extension.javatime;

import com.fasterxml.jackson.jr.ob.JacksonJrExtension;
import com.fasterxml.jackson.jr.ob.api.ExtensionContext;

public class JacksonJrJavaTimeExtension extends JacksonJrExtension {
    final static JavaTimeReaderWriterProvider DEFAULT_RW_PROVIDER = new JavaTimeReaderWriterProvider();

    private JavaTimeReaderWriterProvider readerWriterProvider = DEFAULT_RW_PROVIDER;

    @Override
    protected void register(ExtensionContext ctxt) {
        ctxt.insertProvider(readerWriterProvider);
    }

    public JacksonJrJavaTimeExtension with(JavaTimeReaderWriterProvider p) {
        readerWriterProvider = p;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy