T
- target class for serialization/deserializationpublic class JsonSerde<T>
extends java.lang.Object
implements org.apache.kafka.common.serialization.Serde<T>
Serde
that provides serialization and
deserialization in JSON format.
The implementation delegates to underlying JsonSerializer
and
JsonDeserializer
implementations.
Constructor and Description |
---|
JsonSerde() |
JsonSerde(java.lang.Class<T> targetType) |
JsonSerde(java.lang.Class<T> targetType,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
JsonSerde(JsonSerializer<T> jsonSerializer,
JsonDeserializer<T> jsonDeserializer) |
JsonSerde(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(java.util.Map<java.lang.String,?> configs,
boolean isKey) |
org.apache.kafka.common.serialization.Deserializer<T> |
deserializer() |
org.apache.kafka.common.serialization.Serializer<T> |
serializer() |
public JsonSerde()
public JsonSerde(java.lang.Class<T> targetType)
public JsonSerde(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public JsonSerde(java.lang.Class<T> targetType, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public JsonSerde(JsonSerializer<T> jsonSerializer, JsonDeserializer<T> jsonDeserializer)
public void configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
configure
in interface org.apache.kafka.common.serialization.Serde<T>
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface org.apache.kafka.common.serialization.Serde<T>
public org.apache.kafka.common.serialization.Serializer<T> serializer()
serializer
in interface org.apache.kafka.common.serialization.Serde<T>