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

Sort object keys by name #29

Open
mitar opened this issue Nov 1, 2017 · 2 comments
Open

Sort object keys by name #29

mitar opened this issue Nov 1, 2017 · 2 comments

Comments

@mitar
Copy link
Contributor

mitar commented Nov 1, 2017

JSON schema can have keys in arbitrary order for object type, but for reading I think t would be much more readable if they would be sorted by name.

@mitar mitar changed the title Sort keys by name Sort object keys by name Nov 1, 2017
@mohsen1
Copy link
Owner

mohsen1 commented Nov 1, 2017

This is out of scope of this package. If you like sorted keys you should do it before passing it to your renderer

Also see mohsen1/json-formatter#30

@mitar
Copy link
Contributor Author

mitar commented Nov 1, 2017

Hm, but JavaScript objects do not have order of keys defined by standard (they are in many implementations, notably Chrome). So you cannot presort them.

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

2 participants