yasson
yasson copied to clipboard
Add support for optional JsonbCreator parameters
fixes #237
The PR looks good, however it should probably go along with a PR for https://github.com/eclipse-ee4j/jsonb-api/issues/121
@bravehorsie agreed, but figured I'd get a head start here - not sure what the timeline is for the JSON-B issue
Is some looking to this RR? I need this feature ASAP. Can someone take a look, please?
@aguibert @Verdent Can you folks review it? I am also interested are TCKs will pass with this PR merged?
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
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?
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.