global.maplink.json.codecs.MlpJacksonCodec Maven / Gradle / Ivy
The newest version!
package global.maplink.json.codecs;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonSerializer;
import global.maplink.json.MaplinkSdkModule;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public abstract class MlpJacksonCodec {
private final Class type;
private final JsonSerializer serializer;
private final JsonDeserializer deserializer;
public void register(MaplinkSdkModule module) {
module.addSerializer(type, serializer);
module.addDeserializer(type, deserializer);
}
}