drupol/json-sort ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Rust tool called json sort that can take a JSON file, a folder, or a glob, and sort only the object keys so files are easier to compare in git. It should keep array order exactly as it is, and it should try hard not to reformat the whole file, so existing spacing, indentation, inline layout, comments, and number or string escaping stay mostly untouched. I want a simple command line mode with a fix option and a check only mode for CI, plus support for reading from stdin and writing to stdout when I pass a dash. If you can, also make it work on multiple files in parallel and handle nested folders recursively. A browser version would be nice too, using the same sorting logic, so people can paste JSON into a web page and sort it locally. Use the current docs online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab