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

Make @JsonAlias be respected by polymorphic deduction for deserialization #4335

Merged
merged 16 commits into from
Jan 24, 2024

Conversation

JooHyukKim
Copy link
Member

fixes #4327

@JooHyukKim JooHyukKim marked this pull request as ready for review January 24, 2024 00:27
@cowtowncoder
Copy link
Member

@JooHyukKim I was hoping BeanPropertyDefinition was already exposing accessor but it does not -- only BeanProperty (constructed from BeanPropertyDefinition, used on deserialization side) has it.

But I think it'd make sense to add something like Collection<PropertyName> getAliases() in BeanPropertyDefinition, to encapsulate handling there. If so, that might be something that could simplify/unify alias handling from other places.

@JooHyukKim
Copy link
Member Author

But I think it'd make sense to add something like Collection<PropertyName> getAliases() in BeanPropertyDefinition

Agreed on this. I was actuall looking for such method from BeanPropertyDefinition while working on it.

@JooHyukKim
Copy link
Member Author

Because idea of Implementing getAliases() seemd open-ended, so I so went ahead and filed #4336

@cowtowncoder
Copy link
Member

Because idea of Implementing getAliases() seemd open-ended, so I so went ahead and filed #4336

Good thinking! I think that made sense, merged.

@cowtowncoder
Copy link
Member

Looks good, just needs to change call to findAliases().

I'll call it a night; will get this merged tomorrow. Thanks again!

@cowtowncoder cowtowncoder merged commit c210bdc into FasterXML:2.17 Jan 24, 2024
6 checks passed
@cowtowncoder
Copy link
Member

Merged, thank you @JooHyukKim !

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.

@JsonAlias not respected by polymorphic deduction
2 participants