Closed Bug 485723 Opened 16 years ago Closed 15 years ago

Make JSON bookmarkbackups minimally human-readable

Categories

(Firefox :: Bookmarks & History, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: era+mozilla, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8 Forwarded from https://bugs.launchpad.net/ubuntu/+source/firefox-3.0/+bug/301578 Opening the bookmark backups in file:///home/you/.mozilla/firefox/v3r1s3kr3t.default/bookmarkbackups/bookmarks-2008-11-20.json in the browser shows the beginning a single long line and a horizontal scroll bar. It would be nice if this could be displayed in a somewhat more human-readable format for quick inspection. I believe the JSON format should have some tolerance for adding newlines and indentation in order to make it palatable for humans. Reproducible: Always Steps to Reproduce: 1. In the location bar, type in file:///home and navigate to your own home directory, its .mozilla subdirectory, the firefox subdirectory within that, the subdirectory for your profile (usually with .default at the end of the name) and finally the bookmarkbackups subdirectory within that. 2. Click on one of the files. 3. Try to read it. Actual Results: A long line, from which the following is visible: {"title":"","id":1,"dateAdded":1226491072760742,"lastModified":1226645650728289,"type":"text/x-moz-place-container", Horizontal scroll bar, very coarse, easily scrolls more than a screenful per pixel once the line grows long enough. Expected Results: Easily see the structure of the file, find the JavaScript code for a particular complex bookmarklet, search for a particular keyword to see whether it's already in use, etc. I don't expect a full-fledged browser for this format (that would be nice too, of course, but it's clearly something one could write an extension for, rather than bloat the default Firefox code base with), I just want the on-disk JSON to have some newlines and indentation to make it somewhat human-readable. I am the original submitter of the Ubuntu bug.
Whiteboard: wontfix?
json format is not intended for human comprehension nor manual use. that said, this should at last be supported by the browser as a supported and parsable format, btw not sure if this is something that'd be good as a core browser feature rather than an add-on.
I'm looking for a really minimal fix, like a pair of newlines around each complex internal node in the tree. This is decidedly a secondary or even tertiary use case, but if esoteric cases can be supported with a very trivial fix, I'm hoping it could be accepted.
Actually: according to the JSON.org website: "JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write." http://www.json.org/ I have always thought that one of JSON's best features was human readability. Just a thought.
yes but internet is plenty of json parsers that exactly format json strings in a readable format. So again i'm not sure Firefox should include a json formatter in its core features. And our json is created through native json methods. you probably can take a look at JSONView add-on: https://addons.mozilla.org/en-US/firefox/addon/10869
External JSON viewers and development tools are sufficient, this doesn't need to be fixed in core. -> WONTFIX.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Whiteboard: wontfix?
You are dismissing one primary advantage of serialising in JSON: human readability. I understand you might not be interested but are you opposed? I.e. will you accept a patch that adds some newlines and tabs?
You need to log in before you can comment on or make changes to this bug.