pl.allegro.tech.hermes.api.jackson.PatchDataDeserializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-api Show documentation
Show all versions of hermes-api Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.api.jackson;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import pl.allegro.tech.hermes.api.PatchData;
import java.io.IOException;
import java.util.Map;
public class PatchDataDeserializer extends JsonDeserializer {
@Override
public PatchData deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
Map patch = p.getCodec().readValue(p, new TypeReference