-
Notifications
You must be signed in to change notification settings - Fork 185
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
JsonObject.getXXX methods should have variant which does not require default value #43
Comments
If I understand correctly, your suggestion is to add methods like Those methods would be ambiguous, as in case of returning the "default fallback value" you could not tell whether the member is present or not. For example, Of course, the same is true for |
I follow your reasoning to limit the scope of this library. My use case is to serialize a json object to a regular java object where leaving values in their default state would be the expected deserialization outcome. Therefore i have a lot of redundant method parameters that pass in the default java value. If you think the feature is out of scope, feel free to close the issue. |
@ralfstx Is there a reason To check this now I have to do |
@marceloverdijk I was surprised to find that there wasn't a |
Having to supply a default value on the JsonObject.getXXX methods is sometimes a bit tedious. Often times you just want the string to be null or the boolean to be false. So there should be a variant where it is not required to provide a default value.
The text was updated successfully, but these errors were encountered: