convfmt
convfmt copied to clipboard
cli tool which can convert different formats
convfmt
convfmt is a command line tool in rust which can convert between formats:
Usage:
$ cat cfg.yml | convfmt -f yaml -t toml > cfg.toml
$ convfmt -f json -t json < compact.json > pretty.json
$ curl https://api.github.com/users/oriontvv | convfmt -f json -t json5 > api.json5
By default convfmt uses pretty format(can be disabled with --compact option).
Beware of nulls, some formats don't support them (e.g. toml).
Installation:
-
Download built binary
-
Install binary using cargo-binstall
cargo install cargo-binstall && cargo binstall convfmt
- Build from sources with rust
cargo install convfmt
Many thanks to:
This tool stands on the shoulders of such giants: