I can define a serializer for a class in many places. On the class with
@Serializable
, on the field, for a whole file, in multiple ways with a SerializersModules, and there's also reflection.
Is the order of priority defined somewhere?
I'm asking because I want to see how to override a serializer that's defined on a class with
@Serializable(with = ...)
, and it's not clear in which order serializers are considered and selected.
Serializers from this list have higher priority than default, but lesser priority than serializers defined on the property itself, such as Serializable (with=...) or Contextual.