Project

json2yaml

0.01
No commit activity in last 3 years
No release in over 3 years
Convert between JSON and YAML in CLI
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

json2yaml

Build Status Coverage Status Code Climate

Convert between JSON and YAML in CLI

Installation

$ gem install json2yaml

Usage

Now, you can use json2yaml and yaml2json

Read from STDIN

$ echo '{ "a" : 123 }' | json2yaml
#=>
    ---
    a: 123

$ echo 'a: 123' | yaml2json
#=>
    {"a":123}

$ cat foo.json | json2yaml > foo.yml

$ cat bar.yml | yaml2json > bar.json

Read from files

$ json2yaml log1.json log2.json > log.yaml

$ yaml2json log1.yaml log2.yaml > log.json

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request