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

Add support for optional JsonbCreator parameters #239

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

emattheis
Copy link
Contributor

fixes #237

@bravehorsie
Copy link
Contributor

The PR looks good, however it should probably go along with a PR for jakartaee/jsonb-api#121

@emattheis
Copy link
Contributor Author

@bravehorsie agreed, but figured I'd get a head start here - not sure what the timeline is for the JSON-B issue

@goodidea-kp
Copy link

Is some looking to this RR? I need this feature ASAP. Can someone take a look, please?

@m0mus m0mus requested review from aguibert and Verdent June 26, 2019 20:23
@m0mus
Copy link
Member

m0mus commented Jun 26, 2019

@aguibert @Verdent Can you folks review it? I am also interested are TCKs will pass with this PR merged?

@aguibert
Copy link
Member

hi @m0mus, I added a comment on the issue for this PR (#237) indicating we need to discuss this at the spec level first.

Regarding your comment about the TCK -- where do we store the JSON-B TCK these days? I don't see it over at the spec repo: https://github.com/eclipse-ee4j/jsonb-api

@goodidea-kp
Copy link

I just want to give my use case. I have plenty of classes with a non-default constructor. Some parameters could be null. It is not a good idea to enforce me rewrite few hundreds classes with Optional type. Could I set some configuration parameter to relax on Optional and just directly set null?

@aguibert
Copy link
Member

aguibert commented Aug 5, 2019

haven't forgotten about this issue. I expect creators with missing/optional parameters will be one of the things we will be solving in the next version of JSON-B over in jakartaee/jsonb-api#121

I am going to let this PR sit for now because I don't want to end up with an optional parameter solution that conflicts with what gets agreed upon at the JSON-B level.

@aguibert aguibert changed the title Fixes Issue #237 Add support for optional JsonbCreator parameters Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deserializing JSON with missing field fails using @JsonbCreator
5 participants