RESOLVED CONFIGURATION CHANGED 134920
JSON.parse gives incorrect result for "-0 ".
https://bugs.webkit.org/show_bug.cgi?id=134920
Summary JSON.parse gives incorrect result for "-0 ".
Lasse R.H. Nielsen
Reported 2014-07-15 00:09:31 PDT
JSON.parse("-0 ") should give the same result as JSON.parse("-0"), but where the latter correctly returns -0.0, the former returns positive 0.0.
Attachments
Alexey Shvayka
Comment 1 2019-06-10 17:53:33 PDT
This is fixed as of rev. 246299: negative zero surrounded by whitespace is parsed correctly. To prevent regressions, I am adding a few test cases to Test262: https://github.com/tc39/test262/pull/2196 (file: text-negative-zero.js)
Note You need to log in before you can comment on or make changes to this bug.