Hi is it possible to specify the serializer for a ...
# serialization
t
Hi is it possible to specify the serializer for a specific type for my entire app? I've got lots of @file annotations for my InstantAsMilliLong and would be great to remove them all if I can declare it once somehow?
👀 1
r
My understanding is that the closest you can get is registering them as a SeralizersModule for
Json
and then using
@Context
. I'd love to know if there's a better way as wrong.
in my project, I've simply made an Android Lint rule that returns a
@file:UseSerializers
autofix whenever it sees a usage of certain types in serializable classes lacking specific serializers
t
dang thats too bad .. would be nice to register it in one place 😞
i'll stick with the file annotation for now!