Skip to content

issue 19 JSON Deserialization Should Allow Missing - allow missing fi… #39

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

issue 19 JSON Deserialization Should Allow Missing - allow missing fi… #39

wants to merge 1 commit into from

Conversation

dbford
Copy link

@dbford dbford commented Nov 19, 2019

Per #19, allow missing fields during JSON deserialization by considering 'undefined' and 'null' to be the same in the Node.isNull() method.

This is a desirable feature for a project I'm involved with. We have a large java type that is being passed in REST responses with values that are often null. The type is large enough that the byte savings from excluding null fields is the response is worth it. This feature would allow that.

…elds by considering 'undefined' and 'null' to be the same in the Node.isNull() method
@konsoletyper
Copy link
Owner

This is not the way so solve the problem. What if null is an expected value of a required field? Also, there's required attribute in @JsonProperty annotation, you should also support 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

Successfully merging this pull request may close these issues.

3 participants