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

Feature Request: Sort JSON #111

Open
bennycode opened this issue Jun 15, 2022 · 3 comments
Open

Feature Request: Sort JSON #111

bennycode opened this issue Jun 15, 2022 · 3 comments

Comments

@bennycode
Copy link

It would be nice if the plugin could also sort JSON objects. I very often find myself wanting to sort properties in a "package.json" file or similar.

@Tyriar
Copy link
Owner

Tyriar commented Jun 15, 2022

I've been resistant to doing anything language related but I guess for JSON an exception could be made as parsing JSON is build into the web platform.

@bennycode
Copy link
Author

@Tyriar I am very happy to hear that! Together with @ffflorian I have built Sort JSON and here is how we solved sorting nested JSON (and plain objects): https://github.com/ffflorian/sortjson.com/blob/9bc8549079bfb8d7cc9fe1eebda3bc0848cfd2f4/src/components/layout/Content.tsx#L42-L51

@M1CK431
Copy link

M1CK431 commented Jun 21, 2022

That extension already does the job: https://github.com/richie5um/vscode-sort-json
Perhaps both extensions could be merged? Or at least it could be a good starting point to implement it here 🤷‍♂️

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

No branches or pull requests

3 participants