class KsqlJsonDeserializer implements Deserializer<T> {

  @Override
  public T deserialize(final String topic, final byte[] bytes) {
    try {
      if (bytes == null) {
        return null;
      }

      // don't use the JsonSchemaConverter to read this data because
      // we require that the MAPPER enables USE_BIG_DECIMAL_FOR_FLOATS,
      // which is not currently available in the standard converters
      final JsonNode value = isJsonSchema
          ? JsonSerdeUtils.readJsonSR(bytes, MAPPER, JsonNode.class)
          : MAPPER.readTree(bytes);

      final Object coerced = enforceFieldType(
          "$",
          new JsonValueContext(value, schema)
      );

      if (LOG.isTraceEnabled()) {
        LOG.trace("Deserialized {}. topic:{}, row:{}", target, topic, coerced);
      }

      return SerdeUtils.castToTargetType(coerced, targetType);
    } catch (final Exception e) {
      throw new SerializationException(
          "Failed to deserialize " + target + " from topic: " + topic + ". " + e.getMessage(), e);
    }
  }

    KsqlJsonDeserializer(
      final ConnectSchema schema,
      final boolean isJsonSchema,
      final Class<T> targetType
  );

}