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

JSONB Bind to Object + Default value support #62

Open
mmadson opened this issue Feb 24, 2021 · 1 comment
Open

JSONB Bind to Object + Default value support #62

mmadson opened this issue Feb 24, 2021 · 1 comment
Assignees

Comments

@mmadson
Copy link

mmadson commented Feb 24, 2021

Hi there!

Thanks for the great library. I'm digging into the examples but haven't been able to figure it out yet. Is there a way to perform the jsonb binding while also supporting default values; so that the serialized objects have the default values as specified in the spec?

Much appreciated.

@leadpony leadpony self-assigned this Feb 25, 2021
@leadpony
Copy link
Owner

@mmadson

Sorry for late reply. I have added an experimental example which fills a Java object with default values specified in the JSON schema.
https://github.com/leadpony/justify-examples/tree/binding-default/justify-examples-yasson

Unfortunately, we must use Yasson-specific API directly because pure JSON-B API does not accept JsonParser generated by an external library such as Justify.

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

2 participants