<p>This artifact provides the following serde implementations under the package <aclass="reference external"href="https://github.com/apache/kafka/blob/1.0/clients/src/main/java/org/apache/kafka/common/serialization">org.apache.kafka.common.serialization</a>, which you can leverage when e.g., defining default serializers in your Streams configuration.</p>
<p>This artifact provides the following serde implementations under the package <aclass="reference external"href="https://github.com/apache/kafka/blob/{{dotVersion}}/clients/src/main/java/org/apache/kafka/common/serialization">org.apache.kafka.common.serialization</a>, which you can leverage when e.g., defining default serializers in your Streams configuration.</p>
<tableborder="1"class="docutils">
<tableborder="1"class="docutils">
<colgroup>
<colgroup>
<colwidth="17%"/>
<colwidth="17%"/>
@ -149,20 +149,17 @@
</table>
</table>
<divclass="admonition tip">
<divclass="admonition tip">
<p><b>Tip</b></p>
<p><b>Tip</b></p>
<pclass="last"><aclass="reference external"href="https://github.com/apache/kafka/blob/1.0/clients/src/main/java/org/apache/kafka/common/utils/Bytes.java">Bytes</a> is a wrapper for Java’s <codeclass="docutils literal"><spanclass="pre">byte[]</span></code> (byte array) that supports proper equality and ordering semantics. You may want to consider using <codeclass="docutils literal"><spanclass="pre">Bytes</span></code> instead of <codeclass="docutils literal"><spanclass="pre">byte[]</span></code> in your applications.</p>
<pclass="last"><aclass="reference external"href="https://github.com/apache/kafka/blob/{{dotVersion}}/clients/src/main/java/org/apache/kafka/common/utils/Bytes.java">Bytes</a> is a wrapper for Java’s <codeclass="docutils literal"><spanclass="pre">byte[]</span></code> (byte array) that supports proper equality and ordering semantics. You may want to consider using <codeclass="docutils literal"><spanclass="pre">Bytes</span></code> instead of <codeclass="docutils literal"><spanclass="pre">byte[]</span></code> in your applications.</p>
</div>
</div>
</div>
</div>
<divclass="section"id="json">
<divclass="section"id="json">
<h3>JSON<aclass="headerlink"href="#json"title="Permalink to this headline"></a></h3>
<h3>JSON<aclass="headerlink"href="#json"title="Permalink to this headline"></a></h3>
<p>The code examples of Kafka Streams also include a basic serde implementation for JSON:</p>
<p>The Kafka Streams code examples also include a basic serde implementation for JSON:</p>
<p>You can construct a unified JSON serde from the <codeclass="docutils literal"><spanclass="pre">JsonPOJOSerializer</span></code> and <codeclass="docutils literal"><spanclass="pre">JsonPOJODeserializer</span></code> via
<p>As shown in the example, you can use JSONSerdes inner classes <codeclass="docutils literal"><spanclass="pre">Serdes.serdeFrom(<serializerInstance>, <deserializerInstance>)</span></code> to construct JSON compatible serializers and deserializers.
<codeclass="docutils literal"><spanclass="pre">Serdes.serdeFrom(<serializerInstance>,</span><spanclass="pre"><deserializerInstance>)</span></code>. The
<spanid="streams-developer-guide-serdes-custom"></span><h2>Implementing custom SerDes<aclass="headerlink"href="#implementing-custom-serdes"title="Permalink to this headline"></a></h2>
<spanid="streams-developer-guide-serdes-custom"></span><h2>Implementing custom SerDes<aclass="headerlink"href="#implementing-custom-serdes"title="Permalink to this headline"></a></h2>
@ -170,13 +167,13 @@
existing SerDes (see previous section). Typically, your workflow will be similar to:</p>
existing SerDes (see previous section). Typically, your workflow will be similar to:</p>
<olclass="arabic simple">
<olclass="arabic simple">
<li>Write a <em>serializer</em> for your data type <codeclass="docutils literal"><spanclass="pre">T</span></code> by implementing
<li>Write a <em>serializer</em> for your data type <codeclass="docutils literal"><spanclass="pre">T</span></code> by implementing
such as <codeclass="docutils literal"><spanclass="pre">Serdes.serdeFrom(Serializer<T>, Deserializer<T>)</span></code>.
such as <codeclass="docutils literal"><spanclass="pre">Serdes.serdeFrom(Serializer<T>, Deserializer<T>)</span></code>.
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 <codeclass="docutils literal"><spanclass="pre">KafkaStreams</span></code>.
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 <codeclass="docutils literal"><spanclass="pre">KafkaStreams</span></code>.
If your serde class has generic types or you use <codeclass="docutils literal"><spanclass="pre">Serdes.serdeFrom(Serializer<T>, Deserializer<T>)</span></code>, you can pass your serde only
If your serde class has generic types or you use <codeclass="docutils literal"><spanclass="pre">Serdes.serdeFrom(Serializer<T>, Deserializer<T>)</span></code>, you can pass your serde only