| name | jsonlint |
| description | Use this skill when the user wants to validate JSON files, check JSON syntax, format JSON, or sort JSON keys. |
jsonlint Plugin
A JSON parser and validator with a CLI. Validate JSON files, sort keys, and format JSON.
Commands
JSON Validation
jsonlint validate file — Validate JSON file
Utility
jsonlint _ _ — Passthrough to jsonlint CLI
Usage Examples
- "Validate this JSON file"
- "Check JSON syntax"
- "Format this JSON"
- "Sort JSON object keys"
Installation
npm install -g jsonlint
Examples
jsonlint validate file data.json
echo '{"name": "test"}' | jsonlint
jsonlint validate file data.json -s
jsonlint validate file data.json -i
jsonlint validate file data.json -s -i
cat data.json | jsonlint
jsonlint _ _ data.json
jsonlint _ _ -s -i data.json
Key Features
- Validation - Check JSON syntax
- Error reporting - Clear error messages
- Sort keys - Alphabetically sort object keys
- In-place editing - Modify files directly
- Stdin support - Process from pipe
- Pure JavaScript - No native dependencies
- Cross-platform - Works everywhere
- Fast - Efficient parsing
Notes
- Reports line and column of errors
- Use -s to sort object keys
- Use -i to edit files in place
- Can be used in CI/CD pipelines
- Great for pre-commit hooks
- Validates JSON RFC 8259 compliance