Closed Bug 606488 Opened 14 years ago Closed 1 year ago

Display application/json data as page

Categories

(DevTools :: JSON Viewer, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1243951

People

(Reporter: liam, Unassigned)

References

Details

Attachments

(1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11 When loading a URL with MIME type application/json, Firefox should parse the JSON and display the parse tree, much like what it does for unstyled XML. If there is a parse error, it should display an error message, also like when displaying XML. Reproducible: Always Steps to Reproduce: Load a URL containing JSON data served with application/json MIME type. Actual Results: Firefox offers to download the file. Expected Results: Firefox displays a parse tree of the JSON data.
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Attached patch v1 (obsolete) (deleted) — Splinter Review
This makes application/json documents display as a plain text page. I'm not sure what the first and the second hunk do, but this seems to work. Are there any tests for these things? Tryserver is green: http://tbpl.mozilla.org/?tree=Try&rev=7fd27d580413
Attachment #540889 - Flags: review?(bzbarsky)
Comment on attachment 540889 [details] [diff] [review] v1 > Are there any tests for these things? You can add one for this case, no? This patch looks fine for showing the json as plaintext, but doesn't really fix this bug as filed... should it be on a different bug?
Showing JSON as plain text is better than what it does now, so I support applying this patch as an initial quick fix.
Liam, this is your bug. If you want to mutate it, that's up to you; please feel free to update the summary accordingly. But at the moment, the patch is not fixing this bug.
Thanks, Boris. I have filed a new bug for the simple solution which the patch addresses. See #667533. Hopefully, at least that simple fix can go in quickly.
Comment on attachment 540889 [details] [diff] [review] v1 r=me, but this should be on bug 667533.
Attachment #540889 - Flags: review?(bzbarsky) → review+
And I guess mstange wasn't cced on this bug. <sigh>.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 540889 [details] [diff] [review] v1 Moved this patch to bug 667533.
Attachment #540889 - Attachment is obsolete: true
This extension helps with this: http://jsonview.com/
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 1 year ago
Component: General → JSON Viewer
Duplicate of bug: 1243951
Product: Core → DevTools
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: