Skip to content
A command line program for pretty-printing or minimizing json files.
Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
sf-city-lots-json @ 33c27c1
src
.gitignore
.gitmodules
Cargo.lock
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
README.md

README.md

jsonfmt

Build Status

A command line program for pretty-printing or minimizing json files.

Usage examples

Prettify and overwrite an existing file:

jsonfmt some_file.json

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

Changelog

0.4.1

  • Better build flags in Cargo.toml for increased optimization.

0.4.0

  • Reduced peak memory usage when writing the output to a file.

0.3.0

  • BUGFIX: Preserve order of object properties.
  • BUGFIX: Preserve original number precision.
  • Feature: -m --minimize.
  • Feature: -o for writing to a new file.
  • Feature: Reading from stdin.
  • Feature: Writing to stdout.

0.2.0

  • Traded some memory usage for more speed.

0.1.1

  • Added a readme.

0.1.0

  • A first tiny experiment, but working.
You can’t perform that action at this time.