Skip to content

nealormsbee/y2j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
  ]
}

About

A CLI tool for converting YAML to JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages