diff --git a/docs/streams/developer-guide/datatypes.html b/docs/streams/developer-guide/datatypes.html index 6c7869c3ba1..ca17c0b6362 100644 --- a/docs/streams/developer-guide/datatypes.html +++ b/docs/streams/developer-guide/datatypes.html @@ -112,7 +112,7 @@ </dependency> -
This artifact provides the following serde implementations under the package org.apache.kafka.common.serialization, which you can leverage when e.g., defining default serializers in your Streams configuration.
+This artifact provides the following serde implementations under the package org.apache.kafka.common.serialization, which you can leverage when e.g., defining default serializers in your Streams configuration.
Tip
-Bytes is a wrapper for Java’s byte[]
(byte array) that supports proper equality and ordering semantics. You may want to consider using Bytes
instead of byte[]
in your applications.
Bytes is a wrapper for Java’s byte[]
(byte array) that supports proper equality and ordering semantics. You may want to consider using Bytes
instead of byte[]
in your applications.
The code examples of Kafka Streams also include a basic serde implementation for JSON:
+The Kafka Streams code examples also include a basic serde implementation for JSON:
-You can construct a unified JSON serde from the JsonPOJOSerializer
and JsonPOJODeserializer
via
- Serdes.serdeFrom(<serializerInstance>, <deserializerInstance>)
. The
- PageViewTypedDemo
- example demonstrates how to use this JSON serde.
As shown in the example, you can use JSONSerdes inner classes Serdes.serdeFrom(<serializerInstance>, <deserializerInstance>)
to construct JSON compatible serializers and deserializers.
+
T
by implementing
- org.apache.kafka.common.serialization.Serializer.T
by implementing
- org.apache.kafka.common.serialization.Deserializer.T
by implementing
- org.apache.kafka.common.serialization.Serde,
+ org.apache.kafka.common.serialization.Serde,
which you either do manually (see existing SerDes in the previous section) or by leveraging helper functions in
- Serdes
+ Serdes
such as Serdes.serdeFrom(Serializer<T>, Deserializer<T>)
.
Note that you will need to implement your own class (that has no generic types) if you want to use your custom serde in the configuration provided to KafkaStreams
.
If your serde class has generic types or you use Serdes.serdeFrom(Serializer<T>, Deserializer<T>)
, you can pass your serde only