Deserializer custom types
SarpongAbasimi opened this issue · comments
Hey, If I have this type
sealed trait OperationType extends Product with Serializable
final case object NewSubscription extends OperationType
final case object DeleteSubscription extends OperationType
final case class Organization(organization: String) extends AnyVal
final case class MessageEvent(
operationType: OperationType,
organization: Organization,
repository: Repository
)
I am trying to create a custom deserializer
for the MessageEvent
type just like we have for String.
Is there an Api
for this please?
No reply so closing this issue but I still would love an answer
Hi @SarpongAbasimi, sorry for the late reply.
You can serialize case classes using Avro, Protobuf, or JSON, all of which are supported by Confluent Schema Registry.
You can find an example using JSON here.