dorian-sort-json
Recursively sort JSON object keys.
Install
gem install dorian-sort-jsonAlso included in the aggregate gem:
gem install dorianUsage
sort-json [options] [json ...] [file ...]Run sort-json -h for generated option details and sort-json -v for the installed version.
Notes
- Use
--pretty falsefor compact JSON output.
Examples
Sort inline JSON
sort-json '{"b":2,"a":1}'