Open SJMakin opened 3 years ago
IIRC this bug comes from an oversight in the design of Ceras. (read: I just didn't think of that case :P) But it is possible to fix it in multiple ways. You could rename the field by using attributes. But I imagine that would become a hassle pretty fast.
It would probably be better to use config.OnConfigNewType, then go through each member, and if you ever encounter a member named _dirty
, you'd rename it to something like "ContainingClass._dirty", for example: Base._dirty
or Child._dirty
.
It's a pretty rare edge case and so far have only seen it a couple of times in projects I control and can change. Happy to close this as a workaround is available should I come across it again in code I can't modify. Appreciate your help. S
On Sun, 11 Apr 2021, 10:24 Moritz Staudinger, @.***> wrote:
IIRC this bug comes from an oversight in the design of Ceras. (read: I just didn't think of that case :P) But it is possible to fix it in multiple ways. You could rename the field by using attributes. But I imagine that would become a hassle pretty fast.
It would probably be better to use config.OnConfigNewType, then go through each member, and if you ever encounter a member named _dirty, you'd rename it to something like "ContainingClass._dirty", for example: Base._dirty or Child._dirty.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rikimaru0345/Ceras/issues/91#issuecomment-817277010, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGXYEZXUQENSILXR4IT7DDTIFTD3ANCNFSM4WYXUQHA .
Describe the bug Deserialization fails when processing an object with multiple private fields with the same name.
Additional info
Platform