jackson-databind
jackson-databind copied to clipboard
Allow use of `@JsonFormat(shape=Shape.STRING)` for `string[]`, `int[]`, `long[]`
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.