long Integers rounding last two digits to '00' in JSON view
Categories
(DevTools :: JSON Viewer, defect, P2)
Tracking
(firefox136 fixed)
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | fixed |
People
(Reporter: jrconlin, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Comment 1•8 years ago
|
||
| Reporter | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 8•7 years ago
|
||
I think this bug is grave enough to change the devtools.jsonview.enabled default to "false", and to point users to other json viewer addons which don't have this bug.
Comment 14•4 years ago
|
||
Judging how this is constantly popping up, perhaps it does deserve some priority?
If the built-in JSON parser doesn't provide overflow warnings, perhaps it should? (Where would one file a request like that?)
Or perhaps Moz could re-.stringify() the resultant JS value into JSON and thus verify if parsing succeeded?
Comment 17•4 years ago
|
||
Still seeing this one in the latest Firefox 98.0.2 for Mac. Quite surprising, actually.
Updated•4 years ago
|
Comment 18•3 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 11 duplicates.
:Honza, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 19•3 years ago
|
||
This should be fixed, increasing priority.
Comment 20•3 years ago
|
||
Simple test case with instructions available at: http://janodvarko.cz/tests/bugzilla/1431808/
Comment 22•3 years ago
|
||
There's a proposal to expose the raw text to a JSON.parse function so we could transform those numbers into BigInt (See Bug 1658310)
| Assignee | ||
Comment 25•2 years ago
|
||
Looks like Bug 1855468 is on its way, let's see if we could use it to fix this issue
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 32•1 year ago
|
||
Since we have JSON.parse with source support now¹, I played with a solution that I feel could be nice
So whenever we would get a parsed number that is different from the source, we should display the source number properly, and we could add some UI next to it to display the JS parsed value with a UI that would draw attention to this.
This is a very quick prototype, we could rather have the JS logo or something instead of the warning icon, and have a tooltip on the element, or maybe even better, a link to the https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON#lossless_number_serialization
Let me know if you have opinions about this
¹ should ride the 135 train, see Bug 1934622
| Assignee | ||
Comment 33•1 year ago
|
||
This uses a reviver function in JSON.parse that checks if parsed numbers are
different from their source, and in such case, display both the actual source
as well as the JS parsed value next to it as a "warning", with a title explaining
that the JS parsed value is different from the source.
Under the hood, this is using a new Rep that checks for the specific type
we set in the parse function for such numbers. This also means the ObjectProvider
had to be updated to not render the object "grip" we're constructing as having
child properties.
A test is added to cover those different things.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 34•1 year ago
|
||
Comment 35•1 year ago
|
||
| bugherder | ||
Description
•