You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.
public class MyPojo {
public String[] getVal1() {
return new String[]{"", "foo"};
}
public String[] getVal2() {
return new String[]{null, "bar"};
}
public String[] getVal3() {
return new String[]{"baz",null};
}
public static void main(String[] args) throws JsonProcessingException {
MyPojo jacksonBug = new MyPojo();
CsvMapper mapper = new CsvMapper();
String csvContent = mapper.writer(mapper.schemaFor(MyPojo.class).withHeader()).writeValueAsString(jacksonBug);
System.out.println(csvContent);
}
}
Output is :
val1,val2,val3
foo,bar,baz;
But should be :
val1,val2,val3
;foo,;bar,baz;
The text was updated successfully, but these errors were encountered:
In CsvGenerator.java, the two methods _addToArray inserts the array separator character if at least one character was already appended to _arrayContents :
Take this small example :
Output is :
But should be :
The text was updated successfully, but these errors were encountered: