I have a class in which some of the fields may be null. I want to ignore such fields in my csv .Looking for functionality similar to @JsonInclude(value = Include.NON_NULL) in jackson. Null fields column header should also not come in CSV
Asked
Active
Viewed 655 times
2
-
you know if you export a list of these objects, your CSV will stop making sense, right? – Leo May 12 '14 at 09:55
1 Answers
0
It's up to you to (programatically) define the header, and which columns are written - Super CSV doesn't just automatically marshal an object to CSV for you (like Jackson does for JSON).
You should check out the documentation on the website - in particular the section on partial writing.

James Bassett
- 9,458
- 4
- 35
- 68
-
I have programatically set the headers and based on my header it will pick the fields from my pojo . Which is perfect . Problem : I have a long field (epoch time) which i need to convert to human readable format i.e yyyy/mm/dd . This can be achieved by defining a processor. Processor should be in order of header define , which is little tough here since i am creating a set and adding headers in it programatically. – ha22109 May 14 '14 at 05:14