Aws-cli: Support for colorized JSON output

Created on 22 Aug 2016  路  3Comments  路  Source: aws/aws-cli

It would be great if JSON output can be colorized to make viewing/working with JSON output easier.

An example would be having all JSON keys in one color, strings values in another, and having number values in third. Very similar to what e.g http://www.bodurov.com/JsonFormatter/ would produce in terms of colors. Another example is: http://pygments.org/demo/5862267/

Possible one could simply approach coloring of JSON result by piping through e.g Pygments?
An example from SO (source: http://stackoverflow.com/questions/25638905/coloring-json-output-in-python)

from pygments import highlight, lexers, formatters
colorful_json = highlight(unicode(formatted_json, 'UTF-8'), lexers.JsonLexer(), formatters.TerminalFormatter())
print(colorful_json)
feature-request needs-discussion

Most helpful comment

Based on community feedback, we have decided to return feature requests to GitHub issues.

All 3 comments

Thanks, I've added some thoughts/comments over in #2125. Let's track the discussion over in the PR.

Good Morning!

We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI.

This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports.

As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions.

We鈥檝e imported existing feature requests from GitHub - Search for this issue there!

And don't worry, this issue will still exist on GitHub for posterity's sake. As it鈥檚 a text-only import of the original post into UserVoice, we鈥檒l still be keeping in mind the comments and discussion that already exist here on the GitHub issue.

GitHub will remain the channel for reporting bugs.

Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface

-The AWS SDKs & Tools Team

Based on community feedback, we have decided to return feature requests to GitHub issues.

Was this page helpful?
0 / 5 - 0 ratings