Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top