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
Ok, first things first: would it be possible to minimize the example to include fewer columns?
Also, it'd be good to have unit test style assertions (write as a String, checkout output).
With a quick look usage looks correct: setting of SORT_PROPERTIES_ALPHABETICALLY has no effect with explicit ordering.
Beyond this there are 2 possibilities:
This is general CSV handling problem, reproducible without Kotlin. If so, issue should remain here
This only fails on Kotlin (for some reason), if so, would need to be transferred to jackson-module-kotlin (since CSV format module does not and cannot depend on Kotlin module).
It would be great if a simplified reproduction with Java-only usage could decide between (1) and (2).
cowtowncoder
changed the title
@JsonPropertyOrder ignored for dataformats-csv@JsonPropertyOrder ignored for dataformats-csv
Jul 9, 2021
Using Kotlin, defining a class like this:
And writing it out using:
Doesn't work...the order is not preserved.
Workaround is to use the addColumn syntax to force the order:
Also had to use @field:JsonProperty...using just @JsonProperty and withHeaders() wrote out the field names instead of the @JsonProperty name.
Used:
Kotlin 1.3.72
dataformats-csv 2.12.2
jackson 2.12.2
The text was updated successfully, but these errors were encountered: