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

GitHub

View Github