jackson-dataformat-csv icon indicating copy to clipboard operation
jackson-dataformat-csv copied to clipboard

Support fixed-length values

Open redhead opened this issue 7 years ago • 1 comments

I didn't find if it is currently possible, but could we get support for fixed-length values? With possibility of left/right padding the value.

I don't know if there is some functionality for that already in Jackson, could not find anything. Or maybe it's as simple as providing it by a custom serializer for the field, I guess?

redhead avatar Feb 16 '17 16:02 redhead

There is no out-of-the-box support for that. If this would be for String values, one possibility would be to allow specification of pattern property for @JsonFormat annotation, to specify format to use with String.format(...), with String value itself as the only argument.

cowtowncoder avatar Feb 16 '17 18:02 cowtowncoder