-
Notifications
You must be signed in to change notification settings - Fork 3
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
serialize private fields #10
Comments
ok i dug a bit deeper and found out __traits(derivedMembers..) and the like do not support accessing private fields, I had the same problem when i wanted to add private autowiring to the dependency injection framework poodinis. the solution as i found out using the irc is using T.tupleof. for reference the change in poodinis is here: |
A workaround is to mark the private member |
I just tried a little experiment with |
we had the same problem with the base classes in poodinis and it can be solved iterating over the base classes also at ct: i am pretty sure what needs to be done can be done using tupleof and getAttributes, we do the same in poodinis: or what is it exactly with |
Ah, I see. Your example does it correctly by using Well, then it seems to be possible, but incredibly annoying and a lot work to do. Given that there's a workaround and I'm not terribly interested in supporting private fields, I'd be more than happy to accept patches, but I don't think I'll work on this myself. |
Is it possible to serialize private fields of classes and structs ?
The text was updated successfully, but these errors were encountered: