Metadata-Version: 2.1
Name: y2j
Version: 0.0.2
Summary: A CLI tool for converting YAML to JSON.
Home-page: https://github.com/SheepGotoHeaven/y2j
Author: Neal Ormsbee
Author-email: neal.ormsbee@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: pyyaml

# 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
* `-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"
  ]
}
```


