name: json-yaml-converter description: 在JSON、YAML和TOML格式之间转换,验证和格式化配置文件。 metadata: short-description: 转换JSON/YAML/TOML格式 source: repository: https://github.com/yaml/pyyaml license: MIT
JSON/YAML 转换工具
描述
在JSON、YAML和TOML格式之间进行转换,并提供验证和格式化功能。
触发条件
/convert-config命令- 用户请求格式转换
- 用户需要验证JSON/YAML文件
使用方法
# 将JSON转换为YAML
python scripts/json_yaml_converter.py convert --input config.json --output config.yaml
# 将YAML转换为JSON
python scripts/json_yaml_converter.py convert --input config.yaml --output config.json
# 验证文件
python scripts/json_yaml_converter.py validate --input config.yaml
# 格式化/美化
python scripts/json_yaml_converter.py format --input config.json --indent 2
标签
json, yaml, toml, config, convert
兼容性
- Codex: ✅
- Claude Code: ✅