All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.hermes.api.jackson.PatchDataDeserializer Maven / Gradle / Ivy

There is a newer version: 2.6.22
Show newest version
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>() {});
        return new PatchData(patch);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy