You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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: