-
Notifications
You must be signed in to change notification settings - Fork 45
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
Transform Map<K1,V> -> Map<K2,V> #84
Comments
Hi @kirpi4ik, actually the library is already able to transform Maps, but, as it is now, the Map needs to be in a Java Bean, for example:
is automatically transformed in something like:
by the way, by implementing the feature you suggested, would make BULL able to transform "primitive types" too even if they are not encapsulated in a Java Bean, I think this would be a good feature to add. |
@fborriello Actually my use case would be more about iterating/transforming across the map object which from what I understand not possible now :
|
@kirpi4ik no you're wrong, BULL already supports this kind of transformations.
If this is what you were looking for, we can close the issue. |
@fborriello not sure I understand how I will remap the keys in a map without FieldMap usage, added a short test maybe it will make more sense ? |
Each element of a map is transformed automatically from the library. |
@kirpi4ik did you manage to get the expected result?
Please, let me know if this helps. |
In case of multiple distributed services which are exchanging data, in many cases the most generic deserialization format can be a simple Map<String, Object> collection with some LinkedMap or even more concrete/specific implementation. In many cases this helps to reduce the boilerplate code and avoid writing third-party beans.
Would it make sense or possible to add such feature, where map<k1,v> can be deep transformed into map<k2,v>?
The text was updated successfully, but these errors were encountered: