Skip to content

enuesaa/jsonwith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonwith

Toy JSON Parser & Formatter 🎨

ci

Install

cargo install --git https://github.com/enuesaa/jsonwith

Usage

$ jsonwith --help
Toy JSON Parser & Formatter

Usage: jsonwith [COMMAND]

Commands:
  format     Format JSON
  json2yaml  Convert JSON to YAML
  yaml2json  Convert YAML to JSON [Experimental]

Options:
  -v, --version  Print version
  -h, --help     Print help

Sub Commands

format

$ jsonwith format '{"a":"b"}'
{
  "a": "b"
}

Also, jsonwith reads stdin as json string.

$ cat data.json | jsonwith format
{
  "a": "b"
}

To specify tab size, pass --indent flag.

$ jsonwith format '{"a":"b"}' --indent 4
{
    "a": "b"
}

json2yaml

$ jsonwith json2yaml '{"a":"b"}'
a: b

Also, jsonwith reads stdin as json string.

$ cat data.json | jsonwith json2yaml
a: b

About

Toy JSON Parser & Formatter 🎨

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages