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

Add sorting of keys while printing objects #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maximvl
Copy link

@maximvl maximvl commented Nov 17, 2016

Add nice sorted formatting of objects

@Joshfindit
Copy link

Joshfindit commented Dec 6, 2016

@maximvl
Copy link
Author

maximvl commented Dec 7, 2016

@Joshfindit I saw it, however it is not true:

That would require manually parsing the JSON string with regular expressions (instead of using JSON.parse), which would be too slow

That requires only sorting on formatting step, no additional extra parsing or anything else. Check commit code.

@fenollp
Copy link

fenollp commented Oct 24, 2018

This was the case before: #46
Maybe we could make this an option? I'd love it!

In the meantime this other extension has the sortKeys option: https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh

@maximvl
Copy link
Author

maximvl commented Oct 26, 2018

For sure this can be done as a conditional option. It's quite trivial to add.

Also the original change was reported almost 2 years ago, and is only 3 lines of code, so I don't think anybody cares :)

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

Successfully merging this pull request may close these issues.

4 participants