-
Notifications
You must be signed in to change notification settings - Fork 11
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
Null Widget Received #3
Comments
Yes, an exception being thrown is the expected behavior, because the widget field being null would never have happened in our case. But, I think it would be perfectly valid to change the logic to fall back to the UnknownObjectParser or return a JSONObject if the widget field is null. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The parser throws an exception when receiving a response that contains a null widget.
{ "widget":null }
The exception occurs in JsonParserUtils.java, line 541. Looks like we assume reader will have a nextString() if
discriminationKeyName.equals(firstName)
, is true.Is this the expected behavior? It might be more useful to ignore the null case, and move on to the next object.
For cases such as these, should it be the responsibility of the parser to gracefully deal with null cases, or the responsibility of the server to send valid objects?
The text was updated successfully, but these errors were encountered: