Closed Bug 1740504 Opened 3 years ago Closed 10 months ago

On encountering JSON parsing error, show the raw data by default

Categories

(DevTools :: General, enhancement)

Firefox 94
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1764897

People

(Reporter: kumar, Unassigned)

Details

Attachments

(1 file)

Attached image data-in-raw-tab.png

Steps to reproduce:

When I open https://holidata.net/en-US/2021.json URL, I get SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data error message in Firefox. It's expected behavior of the Firefox, 2021.json file is not in correct JSON data format. All data should be present in a top-level object (i.e. in between {}).

Actually it's a JSON line format. We could argue that content type returned by the server is application/json, which is wrong, but it's a fairly common.

It would be nice, if Firefox could also show the data in raw format by default when it encounters a parsing error by opening Raw Data tab by default, just like Chromium browser does.

The Bugbug bot thinks this bug should belong to the 'DevTools::General' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → DevTools
Status: UNCONFIRMED → RESOLVED
Closed: 10 months ago
Duplicate of bug: 1764897
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: