-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Bidirectional mapping #96
Comments
Maybe you can utilize isomorphisms from other libraries (like |
Also interested in this kind of feature. When you need transformation both ways, it would be nice to be able to define the field mapping only once. |
If anyone is interested in implementing such thing, it would require:
All in all, it is not a difficult work, so most new contributors should be able to do it, but it is also not a one liner to implement during afternoon. |
Sometimes if you have two classes, it might be nice to be able to define a single bi-directional transform instead of having to write one for each one
Not sure if/how this could be done, but just a thought that was inspired somewhat by
play-json
's `Format, which acts as both an encoder and a decoder, coupled to their functional combinator syntax, which comes together to allow for this sort of thing:Actual Ammonite-usage of play-json
It seems to me like doing something like that in Chimney would be "even better" because we don't need to mess around with a
JsPath
and things are fully typed.The text was updated successfully, but these errors were encountered: