Crates.io | yaml2json-rs-bin |
lib.rs | yaml2json-rs-bin |
version | 0.4.0 |
source | src |
created_at | 2020-11-16 15:42:00.96652 |
updated_at | 2022-09-22 16:37:18.520476 |
description | Command line utility to convert YAML files to JSON. |
homepage | https://github.com/Nessex/yaml2json-rs |
repository | https://github.com/Nessex/yaml2json-rs |
max_upload_size | |
id | 312955 |
size | 20,035 |
yaml2json-rs converts one or more YAML documents into a JSON stream.
There are many implementations of this idea, with various limitations. This one aims for:
This implementation relies heavily on the existing work in Serde, yaml-rust and others to provide fast and correct serialization and deserialization. In naïve tests, this provided a significant speed improvement over other implementations, though your mileage may vary.
Download pre-compiled binaries from the Releases Page.
Or, install via cargo
:
cargo install yaml2json-rs-bin --bin yaml2json
Or, quickly try it out with docker
:
echo "hello: world" | docker run -i nessex/yaml2json-rs:master
Utility to convert YAML files to JSON
USAGE:
./yaml2json file1.yaml file2.yaml
cat file1.yaml | ./yaml2json
./yaml2json --error=json file1.yaml | jq
FLAGS:
-h, --help Prints help information
-p, --pretty
-V, --version Prints version information
OPTIONS:
-e, --error <error> [default: stderr] [possible values: silent, stderr, json]
ARGS:
<file>... Specify the path to files you want to convert. You can also pass files via stdin instead.
For best results when dealing with multiple documents, pass multiple files in at once by path:
# Be sure to use + and not \; with find
find . -name '*.yaml' -exec yaml2json {} +
crate | links | description |
---|---|---|
yaml2json-rs-bin | A command line utility to convert YAML to JSON | |
yaml2json-rs | A library wrapping serde-yaml and serde-json to convert a single YAML document to JSON | |
yaml-split | A library providing an iterator over individual YAML documents within a YAML file or stream |
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Please consider supporting the amazing libraries that make this work: