I have following usecase:
I'm having map with properties:
Map <String, String[]> args = new HashMap(){{
put("requester.firstName", "Alice");
put("requester.lastName", "Smith");
put("requester.address", "Glasgow Av");
put("publication.type", "print");
put("publication.subtype", "book");
}};
I need to convert it to this pojo
public class WebRequest{
private Requester requester;
private Publication publication;
}
class Requester{
private String firstName;
private String lastName;
private String address;
}
class Publication{
private String type;
private String subType;
}
Can I use Jackson, to run the conversion? If not, what is the best suitable library for this?
Thanks,
Nadiia