How to lint json files for syntax errors and quality issues
- Step 1Paste the JSON file for comprehensive linting — Paste the complete JSON file content. The linter runs both syntax validation and quality checks in a single pass.
- Step 2Review the lint report — The report shows: (1) syntax errors with position, (2) duplicate keys with their locations, (3) deeply nested paths that exceed the configured depth limit, (4) string value encoding issues.
- Step 3Fix duplicate keys — Duplicate keys in JSON objects are technically allowed by the JSON specification but practically cause problems — most parsers keep only the last value for a duplicated key. Identify which value is correct and remove the duplicate.
- Step 4Integrate jsonlint into your workflow — Install jsonlint: npm install --global jsonlint. Run: jsonlint myfile.json. Add to CI: find . -name '*.json' -not -path './node_modules/*' | xargs jsonlint --quiet to validate all JSON files in the repository.
Frequently asked questions
Does JSON allow duplicate keys?+
The JSON specification (RFC 8259) says object key names SHOULD be unique but does not prohibit duplicate keys. In practice, behavior with duplicate keys varies by parser: most parsers keep the last value, some keep the first, and some throw an error. Duplicate keys are a bug in the data — avoid them by treating duplicate key warnings as errors.
How deep is too deep for JSON nesting?+
There is no formal limit, but practical guidelines suggest keeping JSON nesting to 5-7 levels maximum for maintainability. Deeply nested JSON (10+ levels) is difficult to navigate with JSONPath, hard to display in tree viewers, and often indicates a data modeling problem. Consider flattening deeply nested structures or splitting them into linked objects.
Is the JSON content transmitted to JAD Apps?+
No. Validation and linting runs entirely in your browser. All JSON content is processed locally and never transmitted to JAD Apps servers.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.