https://github.com/aca/yaml2json
Yet another command line tool to convert YAML to JSON(y2j), JSON to YAML(j2y)
https://github.com/aca/yaml2json
Last synced: 6 months ago
JSON representation
Yet another command line tool to convert YAML to JSON(y2j), JSON to YAML(j2y)
- Host: GitHub
- URL: https://github.com/aca/yaml2json
- Owner: aca
- Created: 2019-12-15T01:29:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-26T04:16:32.000Z (over 6 years ago)
- Last Synced: 2024-06-20T16:41:47.515Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
YAML to JSON(y2j), JSON to YAML(j2y)
---
Two extremely simple wrapper of [ghodss/yaml](https://github.com/ghodss/yaml) to handle yaml. Zero config, get inputs only from stdin.
For patching, querying YAML, Let the great 'jq' do all the hard work.
```
cat pod.yaml | y2j
cat pod.json | j2y
kubectl get pods -A -o json | j2y | y2j | jq .
```
#### Install
Using go mod, requires go>=1.13
```
git clone git@github.com:aca/yaml2json.git && cd yaml2json
go install ./j2y
go install ./y2j
```