Faster alternative to json_pp
written in Rust, using serde-json
.
Reads a string from stdin
parses it as json and prints it out as a pretty json string.
- Rust (2021 edition)
- Cargo
We suggest that you install Rust using the 'rustup' tool. Rustup will install the latest version of Rust, Cargo, and the other binaries used for development.
Follow the instructions at Installing Rust.
For Mac users, Homebrew is also an option. The Mac Homebrew command is brew install rustup
and then rustup-init
. See Mac
Setup & Installing
Rust for more details.
After installation, you should have rustc
, cargo
, & rustup
. You should
also have ~/.cargo/bin
in your PATH environment variable.
You can easily install the latest published version of json-pp-rust
with cargo
.
cargo install json-pp-rust
$ echo "{\"hello\": [\"world\", \"json\", 10]}" | json-pp-rust
{
"hello": [
"world",
"json",
10
]
}
Cargo is used as the package manager and build system for json-pp-rust
.
$ git clone https://github.com/Trust-NICKOL/json-pp-rust
$ cd json-pp-rust
$ cargo build --release
$ ./target/release/json-pp-rust --version
The unit-tests of this repository can be used to test the functionality of this library.
cargo test
There are currently no know issues with this tool.
Please you the issue tracker of the github repository if you have any problems using the library.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
For more information see CONTRIBUTING.
This software is released under the MIT License.