SerialName duplication for different polymorphic heirarchies causes collisons when namingStrategy
is set.
#3003
Labels
namingStrategy
is set.
#3003
Describe the bug
We have parallel heirarchies of polymorphic classes. We were seeing fields in one heirarchy appearing in the serialized output of the other; only when
namingStrategy
is set.To Reproduce
Kotest cases:
In the failing test above, the first
encodeToString()
always provides the correct output, and the second always matches it, implying some kind of caching may be to blame.Expected behavior
Serializing
BarBoolean
in the example above should never produce a field fromFooBoolean
. Failing that, the presense ofnamingStrategy
should not alter this behaviour.If neither of the above are practical, then the order in which each class is first serialized should not affect the output.
Environment
The text was updated successfully, but these errors were encountered: