Conversation

Szczurowsky

When you try to parse JSON that has field with type (for ex.) double and value of that field is null, then it throws and exception.
That PR will allow such value for Double and Float, since they have value NaN that fits for that purpose.

@SzczurowskySzczurowsky changed the title handle null values while parsing double and float Handle null values while parsing double and float Aug 30, 2024
@piotrrzysko

Thanks for the PR. A couple of comments:

  1. It would be good to add a test for this.
  2. I'm not sure why the parser should return NaN in this case. If a field is defined as float (not Float), and the JSON contains null for that field, it seems like an error that shouldn't be hidden.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.