public class KafkaJsonDecoder<T> extends KafkaJsonDeserializer<T> implements kafka.serializer.Decoder<T>
| Constructor and Description |
|---|
KafkaJsonDecoder(kafka.utils.VerifiableProperties props)
This constructor is needed by Kafka.
|
KafkaJsonDecoder(kafka.utils.VerifiableProperties props,
Class<T> type)
Create a new decoder using the expected type to decode to
|
| Modifier and Type | Method and Description |
|---|---|
T |
fromBytes(byte[] bytes) |
close, configure, configure, deserialize, getType, objectMapperpublic KafkaJsonDecoder(kafka.utils.VerifiableProperties props)
Object since there is no way to infer a generic type.
In particular, it is an error to do the following:
// WARNING: DON'T DO THIS
KafkaJsonDecoder<String> decoder = new KafkaJsonDecoder<String>(props);
Instead you must use KafkaJsonDecoder(VerifiableProperties, Class)
with the expected type.
props - The decoder configurationCopyright © 2026 Confluent, Inc.. All rights reserved.