Registry / serialization / jsonlint-cli

jsonlint-cli

JSON →
library1.0.1jsnpmunverified

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.

npm install jsonlint-cli
INSTALL
IMPORT
SIG · JSONLINT-CLI
J
jsonlint-cli
serializationjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jsonlint-cli (command)
npm install -g jsonlint-cli # Then use the command
jsonlint-cli is a command-line interface tool and is not intended for direct JavaScript or TypeScript import/require statements. It is executed directly in the shell after global installation.

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'
jsonlint-cli --version
Debug
Known issues
breakingThe `--quiet` flag was removed in version 1.0.0. Errors are now always printed to stderr regardless of other options.
fix
There is no direct replacement for the `--quiet` flag. Users must pipe `jsonlint-cli` output to `grep`, `awk`, or similar utilities if they need to suppress error messages.
affects: >=1.0.0
gotchaThis package has been abandoned since March 2016, with no further releases or active development. It may contain unpatched security vulnerabilities or compatibility issues with newer Node.js versions or JSON Schema drafts.
fix
Consider migrating to actively maintained alternatives for JSON linting and schema validation, such as `ajv-cli` for schema validation or `prettier --parser json` for formatting.
affects: >=1.0.1
gotchaConfiguration precedence for `.jsonlintrc` and `.jsonlintignore` files might be less intuitive in complex directory structures, potentially leading to ignored files being linted or valid files being excluded. While a fix for precedence was implemented in v1.0.1, it's still a point to verify.
fix
Explicitly test your `.jsonlintrc` and `.jsonlintignore` files with `jsonlint-cli` on various target files to confirm the expected behavior. Use `--ignore` flag directly if configuration files are problematic.
affects: <=1.0.1
Errors
Common errors & fixes
command not found: jsonlint-cli
The jsonlint-cli package was not installed globally or is not in your system's PATH.
fix
Run `npm install -g jsonlint-cli` to install the package globally, or ensure the npm global bin directory is included in your shell's PATH environment variable.
No files specified and no input from stdin.
jsonlint-cli requires either file paths/globs as arguments or JSON content piped to stdin to perform validation.
fix
Provide a file path or glob pattern (e.g., `jsonlint-cli mydata.json` or `jsonlint-cli '**/*.json'`) or pipe content (e.g., `echo '{"key":"value"}' | jsonlint-cli`).
JSON parsing error: Unexpected token ...
The input JSON is syntactically invalid, causing the underlying jsonlint parser to fail.
fix
Review the JSON file or input string for syntax errors such as missing commas, unclosed brackets, or incorrect string escaping. Tools like VS Code's built-in JSON validator can help identify issues.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
jsonlintrequiredCore JSON parsing and validation engine.
minimatchrequiredUsed for glob pattern matching.
Agent activity
2 hits · last 30 days
node
2
Resources
jsonlint-cli — npm install jsonlint-cli · libregistry