com.fasterxml.clustermate.json.ClusterMateObjectMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clustermate-json Show documentation
Show all versions of clustermate-json Show documentation
Converters for ClusterMate and StoreMate datatypes,
for Jackson-based JSON serialization
(as well as other dataformats Jackson supports, like Smile)
package com.fasterxml.clustermate.json;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Sub-class of {@link ObjectMapper} that has custom handlers for
* datatypes used by standard StoreMate servers and clients.
*/
@SuppressWarnings("serial")
public class ClusterMateObjectMapper extends ObjectMapper
{
public ClusterMateObjectMapper()
{
// since these are JSON mappers, no point in numeric representation (false)
registerModule(new ClusterMateTypesModule(false));
}
public ClusterMateObjectMapper(JsonFactory f)
{
super(f);
// since these are JSON mappers, no point in numeric representation (false)
registerModule(new ClusterMateTypesModule(false));
}
}