Skip to main content

Converts YAML input to JSON output.

Project description

Source
Open Issues
Author

Converts YAML input to JSON output. Relies on PyYaml, which supports YAML 1.0 and 1.1, but not 1.2.

yml2json has been tested on Python 2.7.11 and Python 3.5.1. YMMV.

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:

  1. Fork yml2json to your GitHub account.

  2. Clone your GitHub copy of the repository into your local workspace.

  3. Write code, fix bugs, and add tests with 100% code coverage.

  4. Commit your changes to your local workspace and push them up to your GitHub copy.

  5. You submit a GitHub pull request with a description of what the change is.

  6. The contribution is reviewed. Maybe there will be some banter back-and-forth in the comments.

  7. 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

yml2json-1.1.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

yml2json-1.1.3-py2-none-any.whl (5.6 kB view details)

Uploaded Python 2

File details

Details for the file yml2json-1.1.3.tar.gz.

File metadata

  • Download URL: yml2json-1.1.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for yml2json-1.1.3.tar.gz
Algorithm Hash digest
SHA256 649c5399d048c17528dbb84c95e3a9e30735d2263b088e3a38184192cb53ca6c
MD5 9b4c3715ca9e0baa9d58a073f5f750d7
BLAKE2b-256 d7d146deb219305d7639bb0a6c19e429c5f9d849942d4587dcba45a7c7394805

See more details on using hashes here.

File details

Details for the file yml2json-1.1.3-py2-none-any.whl.

File metadata

File hashes

Hashes for yml2json-1.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 bb1881b201992e26bd3749674ddcacdb6a23b3da832083986aa21e0d4ab73b25
MD5 e7bcc85e47061fb9cf18c5be350151cc
BLAKE2b-256 ea19f240165f0628a0ab386f85b370e40f63a66c89af25965bf56f30142b8f8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page