jackson-databind icon indicating copy to clipboard operation
jackson-databind copied to clipboard

Allow use of `@JsonFormat(shape=Shape.STRING)` for `string[]`, `int[]`, `long[]`

Open cowtowncoder opened this issue 9 years ago • 0 comments

There is some usage (esp. via Java properties files) where "simple" arrays are expressed as comma-separated lists, like so:

{
   "hosts" : "localhost:8080, otherhost.com:8080"
}

and it would seem reasonable to allow use of Shape.STRING for this.

A related question is that of how to indicate pattern to use; simplest starting point is probably to allow use of pattern to refer to separator to use; and consider "" to either detault to something like [\s*,\s*], or lead to exception for missing pattern.

cowtowncoder avatar May 20 '16 19:05 cowtowncoder