Class DmxFunModule
java.lang.Object
com.fasterxml.jackson.databind.Module
com.fasterxml.jackson.databind.module.SimpleModule
dmx.fun.jackson.DmxFunModule
- All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, Serializable
@NullMarked
public class DmxFunModule
extends com.fasterxml.jackson.databind.module.SimpleModule
Jackson module that registers serializers and deserializers for all dmx-fun types.
Register manually:
ObjectMapper mapper = new ObjectMapper().registerModule(new DmxFunModule());
Or rely on auto-discovery:
ObjectMapper mapper = new ObjectMapper().findAndRegisterModules();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module
com.fasterxml.jackson.databind.Module.SetupContext -
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.module.SimpleModule
_abstractTypes, _deserializerModifier, _deserializers, _hasExplicitName, _keyDeserializers, _keySerializers, _mixins, _name, _namingStrategy, _serializerModifier, _serializers, _subtypes, _valueInstantiators, _version -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.fasterxml.jackson.databind.module.SimpleModule
_checkNotNull, addAbstractTypeMapping, addDeserializer, addKeyDeserializer, addKeySerializer, addSerializer, addSerializer, addValueInstantiator, getModuleName, getTypeId, registerSubtypes, registerSubtypes, registerSubtypes, setAbstractTypes, setDeserializerModifier, setDeserializers, setKeyDeserializers, setKeySerializers, setMixInAnnotation, setNamingStrategy, setSerializerModifier, setSerializers, setupModule, setValueInstantiators, versionMethods inherited from class com.fasterxml.jackson.databind.Module
getDependencies
-
Constructor Details
-
DmxFunModule
public DmxFunModule()Constructs a new instance of DmxFunModule.This module extends
SimpleModuleand is specifically designed to handle serialization and deserialization for various dmx-fun types. During construction, it registers custom serializers and deserializers for types such asTry,Either,Option,Result,Validated,Tuple2,Tuple3,Tuple4, andNonEmptyList.It is used to ensure these types are correctly processed by Jackson's
ObjectMapper.Typical usage includes registering this module with an
ObjectMappereither manually or automatically.
-