Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Handle null values while parsing double and float#57

Open
Szczurowsky wants to merge 1 commit into
simdjson:main from
Szczurowsky:handle-null-values
Open

Handle null values while parsing double and float #57
Szczurowsky wants to merge 1 commit into
simdjson:main from
Szczurowsky:handle-null-values

Conversation

@Szczurowsky

@Szczurowsky Szczurowsky commented Aug 30, 2024

Copy link
Copy Markdown

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.

@Szczurowsky Szczurowsky changed the title (削除) handle null values while parsing double and float (削除ここまで) (追記) Handle null values while parsing double and float (追記ここまで) Aug 30, 2024

Copy link
Copy Markdown
Member

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.
arouel reacted with thumbs up emoji

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /