Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve output of machine oriented commands #2313

Closed
matklad opened this issue Jan 25, 2016 · 3 comments
Closed

Improve output of machine oriented commands #2313

matklad opened this issue Jan 25, 2016 · 3 comments

Comments

@matklad
Copy link
Member

matklad commented Jan 25, 2016

Several cargo sub commands use JSON for output, for example read_manifest and metadata.

It would be nice to to customize this output (e.g. use TOML instead of JSON, redirect output to a file or control pretty printing). The relevant bit of code is here

Original discussion

@matklad
Copy link
Member Author

matklad commented Jan 25, 2016

@alexcrichton what do you think about pretty printing json by default?

We don't send JSON over the network, so there is no much gain in removing all whitespace. And with pretty printing it should be easier for humans to develop cargo-related tools.

@alexcrichton
Copy link
Member

I'd personally prefer to have an alternate pretty-json output format, as this is in theory only really intended for pipelining between tools.

@carols10cents
Copy link
Member

This seems like a concern that's outside of cargo's responsibilities.... for example, you can pipe compact JSON to something like jq to get pretty JSON. Given that there hasn't been a mass clamoring for this in the past year and a half, I'm going to close this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants