yaml2json

module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT

README

yaml2json

Convert YAML to JSON

Usage

$ yaml2json input.yaml # Output JSON to standard output

Install

  • GitHub Releases: Download asset from GitHub Releases and install the executable binary in PATH
  • Homebrew: $ brew install suzuki-shunsuke/yaml2json/yaml2json

How does it work?

This is very simple.

  1. Read YAML with gopkg.in/yaml.v2
  2. Convert map[interface{}]interface{} to map[string]interface{} with suzuki-shunsuke/go-convmap
  3. Output JSON to the Standard Output with encoding/json

Why do we reinvent a wheel?

We know there are already some tools to convert YAML to JSON, but we develop this tool, because we want a single executable binary for macOS, Linux / AMD64, ARM64. Unfortunately, we can't find a single executable binary for Linux ARM64.

LICENSE

MIT

Directories

Path Synopsis
cmd
yaml2json command
pkg
cli

Jump to

Keyboard shortcuts

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