A CLI tool for converting YAML to JSON.
Project description
y2j
A command line tool for translating YAML streams to JSON.
Installation
pip install y2j
Usage
y2j accepts YAML data and writes the equivalent JSON to STDOUT. The YAML may be read from a named file, or from STDIN.
Options
-c,--compressed: Print with no superfluous whitespace.-p,--pretty: Pretty-print the JSON output
The following examples are based on the contents of example.yml:
---
y2j:
- Is easy to use
- Is neat
Reading from a file
$ y2j -p example.yml
{
"y2j": [
"Is easy to use",
"Is neat"
]
}
Reading from STDIN
$ cat example.yml | y2j -p
{
"y2j": [
"Is easy to use",
"Is neat"
]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
y2j-0.0.3.tar.gz
(2.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
y2j-0.0.3-py3-none-any.whl
(3.5 kB
view details)
File details
Details for the file y2j-0.0.3.tar.gz.
File metadata
- Download URL: y2j-0.0.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea7c52cafa9b0b049ac2b3496abdf58fbe0623f204081f6648957e51f7986d4a
|
|
| MD5 |
0e3550c2d7cf9e428ce294ff17983045
|
|
| BLAKE2b-256 |
933f219ead89f6f0dcc1b805abead43c9406c2b6dbdacd5e66c3b79af4e81c1b
|
File details
Details for the file y2j-0.0.3-py3-none-any.whl.
File metadata
- Download URL: y2j-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
992221a576c56c21f9c2b8bd753484a4347822c4ec5b031a468a020c806497db
|
|
| MD5 |
a83e25aa7848b3a3d8c921a7b309b7f5
|
|
| BLAKE2b-256 |
2397aba78126130db61a29e05d4bd687a4067f48b1762f5e1be28ae4bec751c8
|