-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
FasterXML/jackson-databind#1296 @JsonIncludeProperties #174
Conversation
This PR is not for being merged as-is, it's just to get early input |
Makes sense, maybe add suffix or prefix "[WIP]" in title? |
I removed the [WIP] as the related PR is ready to be reviewed and merged (once this one is approved as well): FasterXML/jackson-databind#2771 |
src/main/java/com/fasterxml/jackson/annotation/JsonIncludeProperties.java
Show resolved
Hide resolved
One bigger question: does it make sense to assume that empty set means "include all"? Alternatively there would need to be another property for "includeAll" or something. |
Currently I assumed:
I took that convention because emptySet meaning all would be too messy to handle in the code and somehow counter intuitive to me. Also if you want to merge different inclusions direction and the intersection is empty, it would means in that case include nothing, not include all.
What do you mean ?
Yes, see above, but that's why
includeAll is the same as |
Related to your comment in FasterXML/jackson-databind#2771 (comment) |
@sp4ce Ok: maybe it makes sense to discuss this in DB/2771. But just to summarize here:
That makes sense to me; and only leaves theoretical need to override an existing (but somehow incorrect) Part about intersection/conjunction would probably lead to another question on inheritance (if sub-class overrides, should this extend, limit, or replace settings -- currently it can really only replace), but I'll leave that out for now. |
|
||
/** | ||
* Mutant factory method to override the current value with an another, merging the included fields. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should explain logic (include if in both (intersection), include if in either (conjunction?)).
Ok I think I'd be ready to merge this part first, and hopefully databind soon as well. https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf (unless I have asked for and received one already) This is only needed once for all contributions; the usual method is to print, fill & sign, scan / photo, email to Thank you again for contributing this; looking forward to merging! |
Hello, sorry for the late reply, I sent you the contributor agreement. I have a bit lost track about what we were saying about the |
Thanks; yes, I think I figured the |
No description provided.