I am using Jackson CSV to generate a CSV file, but I want to have the quote everywhere. I couldn’t find any information on the ApiDoc.
CsvMapper mapper = new CsvMapper(); //objects is a list CsvSchema schema = mapper.schemaFor(objects).withHeader(); schema = schema.withQuoteChar('\"');
"name","value" "fieldName1","5" "fieldName2","2" "fieldName3","5"
name,value fieldName1,5 fieldName2,2 fieldName3,5
<dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-csv</artifactId> <version>2.6.3</version> </dependency>
If it’s not possible with Jackson I am open to try another library.
Ok I finally found it by looking at the ApiDoc and searching with Google on how I could put it all together.
Here the solution to enabling the feature that I wanted: