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

Support Optional<primitive> in @JsonbCreator #307

Closed
dansiviter opened this issue Jan 15, 2022 · 4 comments
Closed

Support Optional<primitive> in @JsonbCreator #307

dansiviter opened this issue Jan 15, 2022 · 4 comments

Comments

@dansiviter
Copy link

Related to #121, new spec. doesn't mention OptionalInt, OptionalLong and OptionalDouble primitive wrappers. So small clarification to the spec. to permit these types.

@dansiviter dansiviter changed the title Support Optional<primative> in @JsonbCreator Support Optional<primitive> in @JsonbCreator Jan 15, 2022
@Verdent
Copy link
Contributor

Verdent commented Jan 21, 2022

Each of the Optional types is not listed explicitly, but I would say this is covered by the following sentences:
If the parameter is any type other than Optional or its variations, then the null value is used. If the parameter is Optional or its variations, then the corresponding empty object must be used.

@rmannibucau
Copy link

+1 to clarify it, @dansiviter think you can feel free to PR the text clarification

@Verdent
Copy link
Contributor

Verdent commented Jan 21, 2022

+1 Sure, I am not against it :-)

@dansiviter
Copy link
Author

@rmannibucau Ahhh, that's some subtle wording, thanks for pointing it out. I suppose it is sufficient as it is and hopefully implementors honour it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants