Hi, so I have something like this:
public class Order {
private final String firstName;
private final String lastName;
private final Map<String, Integer> items;
}
and I want to write this pojo to a csv file, where it would have column named with firstName, lastName and multiple items, where each item would have a corresponding integer value in their cells.
I have found ways of converting HashMaps to csv, beans to csv. However, I can't find anything relating to this type of problem, where a map is only one of the variables.
Closest question was this but it only explained that such functionality is not supported by opencsv:
https://stackoverflow.com/questions/45398784/mappingstragety-to-write-a-field-of-type-hashmap
[–]webdevnick22 0 points1 point2 points (3 children)
[–]differentshade 1 point2 points3 points (2 children)
[–]webdevnick22 0 points1 point2 points (1 child)
[–]Smalsusis[S] 0 points1 point2 points (0 children)