yasson icon indicating copy to clipboard operation
yasson copied to clipboard

Add support for optional JsonbCreator parameters

Open emattheis opened this issue 6 years ago • 7 comments
trafficstars

fixes #237

emattheis avatar Feb 15 '19 17:02 emattheis

The PR looks good, however it should probably go along with a PR for https://github.com/eclipse-ee4j/jsonb-api/issues/121

bravehorsie avatar Feb 18 '19 10:02 bravehorsie

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

emattheis avatar Feb 20 '19 14:02 emattheis

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

goodidea-kp avatar Jun 26 '19 18:06 goodidea-kp

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

m0mus avatar Jun 26 '19 20:06 m0mus

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

aguibert avatar Jun 27 '19 14:06 aguibert

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?

goodidea-kp avatar Jun 28 '19 20:06 goodidea-kp

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 https://github.com/eclipse-ee4j/jsonb-api/issues/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 avatar Aug 05 '19 21:08 aguibert