Are proguard rules really needed if you use `Type....
# serialization
a
Are proguard rules really needed if you use
Type.serializer()
on Jvm/Android? In what cases would a reflective serializer be used then?
a
What’s the last one for?
j
the last one is a two-parter because it's an
if
if a companion has a serializer function, keep the static companion field on the original type
the reflection inside kotlinx.serialization will basically do
KClass.getClass().getField("Companion").getMethod("serializer")
Which makes me wonder if it works with named companions... And I should probably change the rule to not match on the field name explicitly. Will need to test both.
a
So it uses reflection even when doing
Type.serializer()
?
Sorry, I realize I used a horrible name. Should’ve used
MyClass.serializer()
j
oh, no that doesn't use reflection
a
Cool, my serializers are only for internal consumption so I should be good