-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Deserializing object with multiple private fields with the same name fails. #91
Comments
IIRC this bug comes from an oversight in the design of Ceras. (read: I just didn't think of that case :P) It would probably be better to use config.OnConfigNewType, then go through each member, and if you ever encounter a member named |
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
<#91 (comment)>,
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
The text was updated successfully, but these errors were encountered: