Hi!
I’m having a bit of trouble, so am fishing for ideas. Maybe there is a simple
answer.
If I convert from Map—>DTO, and the DTO has in its tree a generic field, how
can I tell the converter the correct type so that it does not get converted as
a Map?
Example:
BottomDTO {
public String a;
public String b;
MiddleDTO<T> {
public T bottom;
}
TopDTO<T> {
public MiddleDTO<T> middle;
}
If I just do this, then Map is used for the value of bottom, which will cause a
ClassCastException sometime later during execution:
// Convert from Map to TopDTO<BottomDTO>
converter.convert(someMap).to(TopDTO.class);
Thanks!
=David