json2yaml / cmd
将json数据转换为yaml数据或将yaml数据转换为json数据
v1.0
2020-08-25 02:33 UTC
Requires
- ext-json: *
- symfony/console: ^5.1
- symfony/event-dispatcher: ^5.1
- symfony/yaml: ^5.1
This package is auto-updated.
Last update: 2024-09-26 13:16:56 UTC
README
$ conv
转换数据格式小工具
Usage:
conv [flags]
conv [command]
Available Commands:
help Help about any command
json 转json
yaml 转yaml
Flags:
-h, --help help for conv
-I, --in-file string 待转换的文件地址
-O, --out-file string 转换后的文件地址
json和yaml互转
#输出yaml内容
conv yaml -I a.json
#输出到文件
conv yaml -I a.json -O b.yaml
conv yaml --in-file=a.json --out-file=b.yaml
# 通过重定义传入
conv yaml < a.json
# 通过管道传入
cat a.json | conv yaml
# yaml 转 json
conv json -I a.yaml -O b.json