[SERVER-199] JSON PrettyPrinter Created: 29/Jul/09  Updated: 12/Jul/16  Resolved: 26/Nov/09

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 1.1.4

Type: Improvement Priority: Minor - P4
Reporter: Mathias Stearn Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It would be easier to read JSON docs if they were pretty-printed. I like the way that http://www.jsonlint.com/ does it.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Nov/09 ]

this was added in a previous version in the 1.1.x series.

Comment by Harald Lapp [ 26/Nov/09 ]

i would like to see a beautifier, too. we are using the shell a lot especially for debugging purpose while developing and it's really hard to read, especially when you have nested objects. why not just add a function in the shell, which you could call with a BSON object as parameter?

Comment by sandstrom [ 03/Sep/09 ]

This javascript beautifier could probably be helpful. Written in JS.

http://jsbeautifier.org/

Comment by Eliot Horowitz (Inactive) [ 28/Aug/09 ]

multi-line shell supprt has been added in 1.1.0 already

Comment by sandstrom [ 28/Aug/09 ]

Another addition, python has nice support for multi-line scripting in the shell. Would be nice to have that in mongo too. Writing eg. server-side functions on one row can sometimes get messy.

Comment by Mathias Stearn [ 24/Aug/09 ]

I think it is even more important for longer docs because they are the hardest to meaningfully read when not pretty printed. Perhaps it should be a command-line option. I could see that being useful for people using the shell from a script where it could be useful to assume 1 line == 1 doc.

Comment by sandstrom [ 18/Aug/09 ]

Partially on the same note, code coloring in the shell as well as autocompletion (see how Safari Webinspector does it on javascript) would be nice! Although they are not that important.

Comment by Eliot Horowitz (Inactive) [ 14/Aug/09 ]

is there anything in particular that bothers you? we've looked at doing something more like that, but that for longer docs it takes pages

Generated at Thu Feb 08 02:53:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.