A command line program for pretty-printing or minimizing json files.
Prettify and overwrite an existing file:
Read json from stdin, prettify it and print to stdout:
cat in_file.json | jsonfmt
Read json from stdin, minimize it and write it to a new file:
cat in_file.json | jsonfmt -m -o out_file.json
- Better build flags in Cargo.toml for increased optimization.
- Reduced peak memory usage when writing the output to a file.
- BUGFIX: Preserve order of object properties.
- BUGFIX: Preserve original number precision.
-ofor writing to a new file.
- Feature: Reading from stdin.
- Feature: Writing to stdout.
- Traded some memory usage for more speed.
- Added a readme.
- A first tiny experiment, but working.