At this moment I am working on generating csv from object and I got stuck. I dont know how to generate csv for nested class. For example we have got following classes:
@Getter
@Setter
public class Person {
private int age;
private Name name;
}
@Getter
@Setter
public class Name {
private String firstName;
private String lastName;
}
There is huge problem for. Actually I tested few libraries like jackson and commons csv and I did not find solution. The main problem is that I dont know what fields are in object and have to prepare headers dynamically. Is there any simple way or library which allows for that operation? I would be thankfull for any tips.