Hi folks, there is any annotation that can be used...
# serialization
s
Hi folks, there is any annotation that can be used to tell that a type must be a
@Serializable
one? For Java we can easily use Serializable and on Android also Parcelable.
🚫 2
c
You can force the consumers to pass in a class's
KSerializer
, which will only exist for classes that are
@Serializable
p
I would write a lint rule for that. Then you annotate a Parameter as @RequiresSerializable and then check if the passed class has the serializable annotation
Won't work for generics though