FasterXML / FasterXML/jackson-databind

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

Open
#1,242 2 comments 0 reactions 0 assignees View on GitHub
3.x
Dominant language
Java
Stars
3.7k
Forks
1.5k
Avg merge
3d 6h
Merged PRs (30d)
28

Description

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

``` json
{
"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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.