Closed davidchambers closed 11 years ago
Good points, Rob. I certainly don't want to add another option when one can, as you say, pipe to a prettifier.
I recently read Best Practices for Designing a Pragmatic RESTful API. I agree with the author that pretty-printing makes sense for a REST API, but the constraints are different on the command line. I'll give the matter more thought.
I also agree. There are way too many ways to already prettify JSON on a client to have this done server-side. I'd think efforts would be better spent minimizing the amount of white-space in a textual representation of a JSON object than increasing it.
Potential counterpoint: it does increase parse times and potential for buffer overflow for CLI consumers that are other applications. I've always piped to python -m json.tool (I think it's in the readme) if I needed pretty print.
It's easy to say "make it an option" but there's obviously a cost for too many options.
Thanks, -Rob
On Mon, Jul 22, 2013 at 1:19 PM, David Chambers notifications@github.com wrote: