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

org.zapodot.jackson.java8.JavaOptionalModule Maven / Gradle / Ivy

Go to download

Jackson Databind module for serializing and deserializing Java 8 java.util.Option objects. This tool is forked from original source created by @realjenius

There is a newer version: 2.6.1
Show newest version
package org.zapodot.jackson.java8;

import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.Module;

/**
 * 

Module that installs Java 8 optional support into Jackson.

* *

This is very closely modeled after the support in jackson-datatype-guava for Optionals

* * @author R.J. Lorimer [[email protected]] */ public class JavaOptionalModule extends Module { @Override public String getModuleName() { return "java8"; } @Override public Version version() { return Version.unknownVersion(); } @Override public void setupModule(SetupContext context) { context.addDeserializers(new JavaOptionalDeserializers()); context.addSerializers(new JavaOptionalSerializers()); context.addBeanSerializerModifier(new JavaOptionalBeanSerializerModifier()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy