I have one POJO 'A' and it has more than 30 variables. I have another POJO 'B' and most of the variables are same as in 'A'.
For example A has one variable var1 as List of LocalDate and B has a attribute with the same name var1 but as List of Long (long value of date). Now from the REST Service I got the response in 'B' and my old customers are still using 'A'. I want to convert the response from B to A. As my all other values are same except variable var1, what would be most efficient way to copy all other attributes from var2 to var1? Is there any library that provides such method ?