k8syaml2json

command module
v0.0.0-...-e5155f7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 6 Imported by: 0

README

k8syaml2json

Usage: k8syaml2json < $inputYamlFile > $newlineSeparatedOutputJsonFile

k8syaml2json converts the yaml document or documents input via stdin into json, and outputs them on stdout. It follows kubernetes semantics for both yaml and json.

The output is simple newline separated json blobs, one per input yaml document.

Multiple yaml documents may be separated by '---'.

Why use this?

Some tooling is better at dealing with json than yaml (such as nix). This tool is a helper for those programs.

In addition, various languages that aren't go are really bad at deserializing k8s yaml, and are much better at deserializing k8s json.

This can also help act as a bridge for those languages.

What about CRDs?

They probably don't work. PRs welcome.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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