Skip to content
/ y2j Public

A short, simple tool to convert YAML to JSON as long as it's representable.

Notifications You must be signed in to change notification settings

echojc/y2j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

y2j

A short, simple tool to convert YAML to JSON as long as it's representable.

Install

go get github.com/echojc/y2j

Usage

If a file is provided, convert that file:

$ echo 'abc: 1' > /tmp/a
$ y2j /tmp/a
{"abc":1}

Otherwise, read from stdin:

$ y2j <<.
abc:
  - 1
  - bar: 2
    quux: 3
.
{"abc":[1,{"bar":2,"quux":3}]}

Build

This project depends on go-yaml.

$ go get gopkg.in/yaml.v2
$ go build

About

A short, simple tool to convert YAML to JSON as long as it's representable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages