JSONLint CLI

1.0.1 · abandoned · verified Wed Apr 22

jsonlint-cli is a command-line interface wrapper for the underlying jsonlint library, designed to enhance JSON validation workflows beyond the basic functionality offered by jsonlint itself. While it leverages jsonlint for core JSON validity checking and local schema validation, this CLI tool significantly expands capabilities. Key differentiators include support for glob expansion to lint multiple files (e.g., `**/*.json`), remote JSON schema validation, and adherence to JSON Schema Draft-04. It also introduces an eslint-style configuration system through `.jsonlintrc` and `.jsonlintignore` files for project-specific settings and file exclusions. The package's current stable version is 1.0.1, released in March 2016. Its release cadence is effectively dormant, indicating it is no longer actively maintained or developed.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates global installation, basic file validation, globbing with remote schema validation, and piping from stdin.

npm install -g jsonlint-cli

# Validate a single JSON file
jsonlint-cli path/to/your-config.json

# Validate multiple JSON files using glob patterns and a remote schema
jsonlint-cli --validate http://json.schemastore.org/package --ignore 'node_modules/**/*.json' '**/package.json'

# Lint JSON from stdin and pretty-print it
cat package.json | jsonlint-cli --pretty --indent 4

# Example with a .jsonlintrc config file
# content of .jsonlintrc:
# {
#   "validate": "http://json.schemastore.org/package",
#   "ignore": ["dist/**/*.json"],
#   "indent": 2,
#   "pretty": true
# }
jsonlint-cli '**/*.json'

view raw JSON →