-
-
Notifications
You must be signed in to change notification settings - Fork 331
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 @JsonIgnoreProperties
and @JsonPropertyOrder
merge (optionally), not just override
#82
Comments
Yes this is particularly important in xml where element ordering breaks any contract of the xsd (as per usage in the jaxb module) |
Recently ran into this problem via FasterXML/jackson-module-jaxb-annotations#66, and was wondering why the proposed fix there couldn't be implemented? While I understand the need for a better solution of merging annotations, the proposed fix wouldn't make this worse, as it only applies to If this would be acceptable as an interim solution, I'd be happy to implement it. |
The reason I did not accept proposed fix is because it is against design of So if merging was to be implemented -- something that is, I think, a good idea -- I was thinking it should be done by code in This is not the only way to solve the problem, and I am open to other proposals. It just should be something more generic than specific annotation type. |
A small subset of array-valued annotations would benefit from ability to append/merge their values.
List includes at least:
@JsonIgnoreProperties
(default: simple union/merge)@JsonPropertyOrder
(default: simple append?)In these cases, current behavior of full replacement is probably not what is usually the expected behavior.
But additionally we should probably also allow alternate choice of "override"/"overwrite".
One obvious challenge is that since
Annotation
types can not be instantiated, we may have to figure out whether we could use value object approach (see@JacksonAnnotationValue
for details) to help here.The main challenge here is to combine two important aspects:
So: big part of this is to see if merging is practical, and how.
The text was updated successfully, but these errors were encountered: