jamal

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 8 Imported by: 0

README

Jamal

YAML to JSON and JSON to YAML conversion tool. Written in Golang so it can be statically compiled and dropped anywhere you need it.

Build of latest release.

Build

go get github.com/quantumew/jamal
cd "$GOPATH/src/github.com/quantumew/jamal"
go build
mv jamal <in you path somewhere>

Usage

./jamal <action> [<input-file>]

Options:
    -h --help       Show this message.

Arguments:
    <action>        Conversion action. [yamltojson, y2j, yaml2json | jsontoyaml, j2y, json2yaml]

    <input-file>    Path to data file.

Examples

# Output YAML from a JSON file.
jamal json2yaml some-file.json

# Output JSON from a YAML file.
jamal yaml2json some-file.yaml

# Output YAML from JSON from STDIN.
echo '{"property": 5, "otherThing": true}' | jamal j2y

Documentation

Overview

usr/bin/env go run $0 $@; exit;

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL