net.pincette.jes.util.JsonSerde Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pincette-jes-util Show documentation
Show all versions of pincette-jes-util Show documentation
Utilities to work with pincette-jes
package net.pincette.jes.util;
import java.util.Map;
import javax.json.JsonObject;
import org.apache.kafka.common.serialization.Deserializer;
import org.apache.kafka.common.serialization.Serde;
import org.apache.kafka.common.serialization.Serializer;
/**
* A Kafka serde for JSON objects.
*
* @author Werner Donn\u00e9
* @since 1.0
*/
public class JsonSerde implements Serde {
@Override
public void close() {
// Nothing to close.
}
@Override
public void configure(final Map map, final boolean isKey) {
// Nothing to configure.
}
public Deserializer deserializer() {
return new JsonDeserializer();
}
public Serializer serializer() {
return new JsonSerializer();
}
}