https://github.com/oldthreefeng/yq
yaml to json, json to yaml tool
https://github.com/oldthreefeng/yq
Last synced: about 1 year ago
JSON representation
yaml to json, json to yaml tool
- Host: GitHub
- URL: https://github.com/oldthreefeng/yq
- Owner: oldthreefeng
- License: apache-2.0
- Created: 2020-11-18T12:56:22.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-25T08:34:56.000Z (about 5 years ago)
- Last Synced: 2024-06-19T14:58:09.591Z (about 2 years ago)
- Language: Go
- Size: 37.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage
trans yaml to json, default is yaml
```
# use file
$ yq -f test.yaml -o json | jq .
# usr stdin
$ cat test.yaml | yq -f - -o json| jq .
# use url
$ yq -f https://fenghong.tech/yq/default.yaml -o json | jq .
```
trans json to yaml.
```
# use file
$ yq -f test/test.json
# usr stdin
$ cat test/test.json | yq -f -
# use url
$ yq -f https://fenghong.tech/yq/default.json
```
## docker use
docker only support url if u don't use volume
```
$ docker run --rm louisehong/yq -f https://fenghong.tech/yq/default.yaml -o json | jq .
```
## use goreleaser and github actions to cicd