Kuba Petržílka
02/02/2022, 3:04 PMsealed interface SystemXsId {
@Serializable
@JvmInline
value class Known(val value: NonEmptyString) : SystemXsId
@Serializable
object Unknown : SystemXsId
}
to be serialized either as:
• the value of NonEmptyString (which is already serializable and it works) - in case it is Known
• null in case it is Unknown
I probably have to specify an explicit serializer for the sealed interface, but how would it look like?Dominaezzz
02/02/2022, 5:57 PM