-
Notifications
You must be signed in to change notification settings - Fork 79
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
More Flexible subtype resolver #139
base: master
Are you sure you want to change the base?
Conversation
…olving sub types. Fixes: mbknor#137 Rather than providing a callback, just move the actual code for resolving subtypes into the resolver itself. Then users are free to implement what they like here. Obviously, it's their responsibility that this aligns with what ever weird and wonderful serialization logic they have.
Thanks. This looks interesting. I'm looking into it.. |
I think it should be, but haven't tried it. Definitely worth testing! |
Updated dependencies would also help me, if you're able #136 |
Thoughts on this change @mbknor. Feel free to close the PR is you're not going to merge / adopt... |
1 similar comment
Thoughts on this change @mbknor. Feel free to close the PR is you're not going to merge / adopt... |
Fixes: #137
Alternative to: #138
Note: built on top of #138 - sorry, being a bit lazy.
Rather than providing a callback, just move the actual code for resolving subtypes into the resolver itself. Then users are free to implement what they like here.
Obviously, it's their responsibility that this aligns with what ever weird and wonderful serialisation logic they have.
I've tried to make the change backwards compatible. Though I'm no Scala expert.
I think the introduction of the
SubTypeResolver
trait matches up well with the fix in #135, i.e. its no longer classes, but types, that are being resolved.Personally, I prefer this pattern to #138.