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

Fix JsonAlias with unwrapped lists #456

Merged
merged 1 commit into from
Mar 26, 2021

Conversation

westinrm
Copy link
Contributor

WrapperHandlingDeserializer does not add aliases for unwrapped properties to the set of unwrapped names,
causing deserialization of unwrapped lists using aliases to fail.

This has the slightly strange behavior that if you mix aliases you'll end up with the latter sequence.
Ex <val>1</val><alias>2</alias> will deserialize to [2] instead of [1,2]

@cowtowncoder
Copy link
Member

First of all, thank you for contributing this fix & test that verifies it. I'd be happy to merge this in.

Just one quick clerical thing: if I haven't asked for and received CLA earlier (I don't think so but I have let me know and I'll dig more), I'd need one:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

before committing the patch. Only needs to be done once and is good for any number of contributions.
The common way is to print CLA doc, fill & sign, scan/photo, email to info at fasterxml dot com. Once I receive it, I'll merge this into 2.11 branch (seems like a safe enough fix so that makes sense as target).

Looking forward to merging this, thank you again!

@westinrm
Copy link
Contributor Author

westinrm commented Mar 22, 2021

Sorry for the long delay here -- I've sent a CLA to info at fasterxml dot com that should cover any contributions by me.

@cowtowncoder
Copy link
Member

@westinrm Np. I don't yet see it.. but will keep checking, might be just delay.

@westinrm
Copy link
Contributor Author

It was sent on Friday, Mar 19th around 11pm GMT.

@cowtowncoder
Copy link
Member

uff. Of course it went to "spam" for some reason. Ok, mystery solved.

@cowtowncoder cowtowncoder added this to the 2.12.3 milestone Mar 26, 2021
@cowtowncoder cowtowncoder merged commit a55f327 into FasterXML:2.11 Mar 26, 2021
cowtowncoder added a commit that referenced this pull request Mar 26, 2021
@cowtowncoder
Copy link
Member

Thank you again! Merged in 2.11 branch, but most likely to be available in 2.12.3 next (2.11 may or may not get another minor version release; if one is done it'll be 2.11.5)

@westinrm westinrm deleted the fix/json-alias-unwrapped branch March 26, 2021 04:17
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

Successfully merging this pull request may close these issues.

2 participants