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
Casey Brooks
03/03/2022, 4:36 PM
You can force the consumers to pass in a class's
KSerializer
, which will only exist for classes that are
@Serializable
p
Paul Woitaschek
03/03/2022, 10:45 PM
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