Class ThriftJacksonModule
java.lang.Object
com.fasterxml.jackson.databind.Module
com.linecorp.armeria.common.thrift.ThriftJacksonModule
- All Implemented Interfaces:
Versioned
Jackson
Module
for Thrift types. You can serialize ThriftCall
, ThriftReply
,
TMessage
, TBase
and TApplicationException
by registering this module:
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new ThriftJacksonModule());
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module
Module.SetupContext
-
Constructor Summary
ConstructorDescriptionCreates a new instance with the default settings.ThriftJacksonModule
(boolean useNamedEnums) Creates a new instance. -
Method Summary
Methods inherited from class com.fasterxml.jackson.databind.Module
getDependencies, getTypeId
-
Constructor Details
-
ThriftJacksonModule
public ThriftJacksonModule()Creates a new instance with the default settings. -
ThriftJacksonModule
public ThriftJacksonModule(boolean useNamedEnums) Creates a new instance.- Parameters:
useNamedEnums
- whether to serialize an enum as a string or an integer
-
-
Method Details
-
getModuleName
- Specified by:
getModuleName
in classModule
-
version
-
setupModule
- Specified by:
setupModule
in classModule
-