Converts YAML input to JSON output.
Project description
Converts YAML input to JSON output. Relies on PyYaml, which supports YAML 1.0 and 1.1, but not 1.2.
Examples
yml2json sample.yml
yml2json sample.yml --pretty
yml2json sample.yml --output sample.json
yml2json sample.yml --output sample.json --pretty
cat sample.yml | yml2json
cat sample.yml | yml2json --pretty
cat sample.yml | yml2json --output sample.json
cat sample.yml | yml2json --output sample.json --pretty
Installation
Using Pip:
pip install yml2json
Developing
First, install VirtualEnv.
pip install --upgrade virtualenv
Next, activate your virtual environment and install the dependencies.
virtualenv vendor && \
source vendor/bin/activate && \
pip install -r requirements.txt && \
pip install -r requirements2.txt
Contributing
Here’s the process for contributing:
Fork yml2json to your GitHub account.
Clone your GitHub copy of the repository into your local workspace.
Write code, fix bugs, and add tests with 100% code coverage.
Commit your changes to your local workspace and push them up to your GitHub copy.
You submit a GitHub pull request with a description of what the change is.
The contribution is reviewed. Maybe there will be some banter back-and-forth in the comments.
If all goes well, your pull request will be accepted and your changes are merged in.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yml2json-1.1.2.tar.gz
.
File metadata
- Download URL: yml2json-1.1.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c70f1d095a99a64d0ad0b807c00b75a237ef8549247e1100c878b2c188047bb |
|
MD5 | b2db2500b1740ae425ca803a1a34b96e |
|
BLAKE2b-256 | de9155d797d8448c4d658cb56740fbd3618c266c79fe589fcb6e824adc2259a2 |
File details
Details for the file yml2json-1.1.2-py2-none-any.whl
.
File metadata
- Download URL: yml2json-1.1.2-py2-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e09686fd1f2d53b22e9cd4595ff7673a102e78a3f133588b24e108b2ed7e686d |
|
MD5 | 9ee251121e7bff70b211a94800283523 |
|
BLAKE2b-256 | 674d36dd77ad351fca5b96bfd4d6dfc357d1cf3988d71a868df6f28e9e5ccea3 |