Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) does not work on fields #1043

Closed
cowtowncoder opened this issue Dec 11, 2015 · 3 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

(note: moved from FasterXML/jackson-annotations#67)


Looks like JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY per-property override does not work, unlike its serialization counterpart (JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED)

@cowtowncoder
Copy link
Member Author

Oddly enough, while other features are supported, implementation for this (beyond exposing value for property) is missing. Due to extensive amount of changes needed, will only go in 2.7.

@cowtowncoder cowtowncoder changed the title @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) does not work on fields having @JsonProperty(value = "Something") @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) does not work on fields Dec 11, 2015
@cowtowncoder cowtowncoder added this to the 2.7.0-rc2 milestone Dec 11, 2015
@dwybourn
Copy link

Was this ever fixed in 2.7? I'm still seeing this bug in 2.9.1

@cowtowncoder
Copy link
Member Author

@dwybourn yes, as per check-in above and closing of this issue it should work.
If not, please file a new issue with reproduction -- I prefer not opening old issues since it makes tracking of fixes more difficult, even if the root cause is same or earlier fix was incomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants