question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to allow pretty print without alpha sorting

See original GitHub issue

Right now, the options are colors, format, and all, but often the order of the json returned is intentional and for clarify. It would be nice to be able to pretty print the json without having it’s keys sorted 😃

Awesome tool, and thanks very much for everything!

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Reactions:14
  • Comments:36 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
jakubroztocilcommented, Jun 18, 2020

Just released v2.2.0 that addresses this issue. Learn about about the new --unsorted, --sorted and --format-options here:

https://httpie.org/docs#colors-and-formatting

6reactions
virgo47commented, Aug 19, 2019

This feature should be default. I love HTTPie, but resorting the keys - while convenient for some usage - is confusing if you don’t realize, that client tool does this. Piping http to jq -C is a workaround, but it should be default behavior. While the order is not probably that important for a machine, it may be for a human observer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Option to allow pretty print without alpha sorting #128 - GitHub
It would be nice to be able to pretty print the json without having it's keys sorted :) Awesome tool, and thanks very...
Read more >
prevent beeprint or prettyprint from ordering dict keys in ...
Finally figured out how to work this out : by setting PrettyPrinter parameter "sort_dicts" to False keys are ordered according to input ...
Read more >
Prettify Your Data Structures With Pretty Print in Python
sorts the keys alphabetically. It keeps the output for dictionaries consistent, readable, and—well—pretty! When pprint() was first implemented, dictionaries ...
Read more >
pprint — Data pretty printer — Python 3.11.1 documentation
Construct PrettyPrinter objects explicitly if you need to adjust the width constraint. Dictionaries are sorted by key before the display is computed. Changed...
Read more >
tidy - check, correct, and pretty-print HTML(5) files
--output-xml Boolean (no if unset) This option specifies if Tidy should pretty print output, writing it as well-formed XML. Any entities not defined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found