Repository navigation
Conversation
slachiewicz
left a comment
There was a problem hiding this comment.
The fix is correct: writeJSONDouble now emits "NaN", "Infinity" and "-Infinity" via writeJSONString for non-finite values and leaves writeJSONNumber untouched for finite ones, so existing output is byte-identical. Both TJSONProtocol and TSimpleJSONProtocol are covered, map keys work, and the reader already accepts the quoted tokens, so this closes a genuine write-side hole.
Non-blocking: the new test only covers list elements. The JIRA also calls out map keys and struct fields, and TSimpleJSONProtocol.writeDouble is modified but untested — adding those cases would fully lock in the fix. A one-line PR description would also help reviewers.
Drafted with Claude — please verify
slachiewicz
left a comment
There was a problem hiding this comment.
Re-reviewing the rewritten head 41a0d6a: the new commit adds the test_non_finite_double_map_key and test_simple_json_non_finite_double cases I asked for, and the PR body now carries a one-line explanation. Both tests look correct — the map-key case pins {"NaN":1} and the simple-JSON case pins "NaN". No other changes beyond the test additions.
The earlier APPROVE was on the superseded commit a31715c; re-approving this head.
Drafted with Claude — please verify
Non-finite doubles are now written as the quoted strings "NaN", "Infinity" and "-Infinity" instead of bare nan/inf, which isn't valid JSON.
[skip ci]anywhere in the commit message to free up build resources.