Closed Bug 554025 Opened 15 years ago Closed 10 years ago

Implement JSON PrettyPrinting

Categories

(DevTools :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1132203

People

(Reporter: kohei, Unassigned)

References

Details

JSON is getting popular these days. I know there are some add-ons to prittyprint JSON files but such functionality should be implemented by default like XML. https://addons.mozilla.org/firefox/addon/10122 JSONovich https://addons.mozilla.org/firefox/addon/10869 JSONView
Can anyone take this? I've seen some developers are confused as JSON files are downloaded. FYI, Chrome/Safari renders application/json files as plaintext.
(Moving Product/Component for attention)
Assignee: general → nobody
Component: JavaScript Engine → Developer Tools
Product: Core → Firefox
QA Contact: general → developer.tools
There is an extension called JSONView which handles this well including syntax highlighting, expanding / collapsing branches, unicode support, clickable links etc. I have to admit that it would make more sense to have this functionality built in to the browser.
JSON.stringify can indent the code. Syntax highlighting could be achieved with Orion. https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/JSON/stringify
Sorry for the dense question but I presume this is needed for the 'Net' logging in the Web Console? When the user has clicked on 'Log Request and Request...' menu option?
This bug intends to implement PrettyPrinting in the browser content area like XML documents.
OK, cool, I was thrown by "Component: Developer Tools". Good idea.
Yeah, actually this is not a part of DevTools but a goody for developers.
The network monitor has a JSON view. Is there anything more required beyond that?
Flags: needinfo?(vporof)
We have JSON.stringify that can indent, the VariablesView that can display rawObjects and the source editor that can display colorized text. I think it's more than enough.
Flags: needinfo?(vporof)
I agree, going to resolve this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
This is not resolved, as my request was implementing JSON PrettyPrinting in the browser content area. Even in the network monitor, there is no PrettyPrinting ability.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I was about to file the same bug and talked to Paul Rouget about it recently. Json is the new xml and the JsonView add-on has become an essential part of my workflow as I use Json a lot like most developpers working with external APIs. It would really be a great addition to Firefox for developpers (both frontend and backend since Json is also widely used in server-side scripting languages) to have pretty-printing of json files directly in the browser.
Status: REOPENED → NEW
Honza is working on this: "Also, here is github repo with the current prototype: https://github.com/janodvarko/prototypes/tree/master/json-viewer (+ a screenshot: http://snag.gy/BdUN5.jpg )"
Status: NEW → RESOLVED
Closed: 12 years ago10 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.