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

net.pincette.jes.util.JsonSerde Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy