A simple JSON formatting, validation, and conversion tool.
bash
python3 skills/json-formatter/scripts/json_formatter.py <action> [options]
ActionDescriptionformatFormat JSON with indentationcompressMinify JSON (remove whitespace)validateValidate JSON syntaxto-yamlConvert JSON to YAMLfrom-yamlConvert YAML to JSON
OptionTypeDefaultDescription--inputstring-Input string or file path--indentint2Indentation spaces (for format)--fileboolfalseTreat input as file path
bash
# Format JSON
python3 skills/json-formatter/scripts/json_formatter.py format --input '{"name":"test","value":123}'
# Compress JSON
python3 skills/json-formatter/scripts/json_formatter.py compress --input '{"name": "test", "value": 123}'
# Validate JSON
python3 skills/json-formatter/scripts/json_formatter.py validate --input '{"name":"test"}'
# Convert to YAML
python3 skills/json-formatter/scripts/json_formatter.py to-yaml --input '{"name":"test","items":[1,2,3]}'
# From YAML to JSON
python3 skills/json-formatter/scripts/json_formatter.py from-yaml --input 'name: test'
In development.