com.fasterxml.jackson.jr.extension.javatime.JacksonJrJavaTimeExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jackson-jr-extension-javatime Show documentation
Show all versions of jackson-jr-extension-javatime Show documentation
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