class KsqlJsonSerdeFactory {

  <T> Serde<T> createSerde(
      final ConnectSchema schema,
      final KsqlConfig ksqlConfig,
      final Supplier<SchemaRegistryClient> srFactory,
      final Class<T> targetType
  ) {
    final Supplier<Serializer<T>> serializer = () -> createSerializer(
        schema,
        ksqlConfig,
        srFactory,
        targetType
    );

    final Deserializer<T> deserializer = createDeserializer(schema, targetType);

    // Sanity check:
    serializer.get();

    return Serdes.serdeFrom(
        new ThreadLocalSerializer<>(serializer),
        deserializer
    );
  }

    KsqlJsonSerdeFactory(final boolean useSchemaRegistryFormat);

}