Closed odd closed 7 years ago
Hi, thanks for your submission. Is it an optional extension or does it sideeffect also on preregistered serializers (~backward compatibility issues) ?
Hi, it is intended to work as before for all class based serializers since the lineage of a class will include all superclasses in the same order as the current traversal via getSuperclass(). The new lineage based traversal will however also include any interfaces (in order from most to least specific) so if a serializer is registered for an interface that is more specific than a superclass the one for the interface will be found first and thus used. So if no serializers are registered for any interfaces it will function in the same way as it does now (at least that's the idea).
I'll give it a shot :) . I'll start providing a "stable-branch" so I can be less picky regarding pull requests. Thanx for supporting :)
will be included in 2.49
Adds the ability to register serializers for interfaces (in addition to classes). To find the most specific serializer for a class C all ascendants of C (both superclasses and interfaces) are searched in order of their specificity (i.e. a more specific ancestor is checked before a less specific one). The specificity of a class is defined as follows: