-
Notifications
You must be signed in to change notification settings - Fork 76
Column order of CSV schema is ignored when @JsonFormat(shape = JsonFormat.Shape.ARRAY)
is present
#68
Comments
There is a workaround: use |
Thank you for reporting this. |
Ok, I think I know why this occurs. Since This is not easy to change, so your work-around is useful. But one thing I am wondering is whether you could instead just avoid using |
I am using
|
Ah ok. Yes, I figured there probably is a reason for that being there. :-) I am not against making this work better (it should work better). The practical problem is just separation of higher-level data-binding code that handles translation between Object/Array, and underlying CSV backend; that is, how to handle interaction. Perhaps one option would be to add one more introspection option into streaming generator/parser, which indicates whether format backend supports "as-array" POJO handling or not. If not, it would simply ignore handling and use default POJO processing. |
I don't really know a lot about the internals of Jackson so I can't really offer any insight. But at least the tests in the linked Gist should provide a clear definition of the problem. And hopefully others who need to do this right now will be able to use the workaround. Good luck! |
@georgewfraser Right I was more "writing out aloud", both to validate my idea, and to document it for future. There are enough things to work on so that it is quite possible to forget about valid implementation ideas, or possible constraints, unless I write these down. |
Here is a minimal example demonstrating the bug:
https://gist.github.com/georgewfraser/a2f722bdde3d4194b9ee
The text was updated successfully, but these errors were encountered: