# Validate JSON Data Faster

Broken JSON slows API work, configuration reviews, and data handoffs. This skill validates, formats, repairs, converts, and explains JSON issues in clear steps.

## Install

```bash
npx skillstore add alon2904/json-validator
```

## Metadata

- - Slug: alon2904-json-validator
- - Version: 1.0.0
- - Author: Alon2904
- - GitHub username: Alon2904
- - License: MIT
- - Repository: https://github.com/Alon2904/claude-code-skill-creator/tree/main/examples/json-validator
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: low
- - Quality score: 78
- - Quality tier: bronze
- - Public page: https://skillstore.pages.dev/skills/alon2904-json-validator
- - Manifest: https://skillstore.pages.dev/api/skills/alon2904-json-validator/manifest

## Capabilities

- Validates JSON syntax and reports clear error locations.
- Formats minified JSON with consistent two-space indentation.
- Fixes common issues such as trailing commas, single quotes, comments, and unquoted keys.
- Converts JSON to YAML, TOML, CSV, or XML with type preservation guidance.
- Analyzes top-level structure, nesting depth, key types, and repeated patterns.
- Suggests improvements for inconsistent names, deep nesting, and large arrays.

## Use Cases

- Repair API Payloads: Find syntax errors in request or response payloads and return a corrected version with explanations.
- Clean Configuration Files: Format and validate JSON configuration before it is committed or shared with a deployment system.
- Review Data Structure: Summarize object keys, array sizes, nesting depth, and repeated patterns before data transformation work.

## Prompt Templates

### Validate Basic JSON

```
Validate this JSON. List each syntax issue with its line number, explain the problem, and provide a corrected version.
```

### Format and Preserve Data

```
Format this JSON with two-space indentation. Preserve all values and data types. Tell me if you changed anything beyond whitespace.
```

### Fix Common JSON Mistakes

```
Fix this invalid JSON. Check for trailing commas, comments, single quotes, unquoted keys, and invalid values. Explain each repair.
```

### Analyze and Convert Structure

```
Analyze this JSON structure, summarize key types and nesting depth, then convert it to YAML while preserving the original data meaning.
```

## Limitations

- It does not execute code or call external validation services.
- Large files may need to be split before detailed analysis.
- Schema validation requires the user to provide the relevant schema.
- Ambiguous repairs may require confirmation before changing data meaning.

## Best Practices

- Validate JSON before formatting or converting it.
- Ask before sorting keys or removing comments from user-provided data.
- Preserve numbers, booleans, null values, and strings exactly unless the user requests a change.

## Anti Patterns

- Do not silently change data values while fixing syntax.
- Do not assume comments are safe to remove without user approval.
- Do not treat JSON-like JavaScript objects as valid strict JSON.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T08:15:25.273\+00:00
- - Summary: Static analysis reported external command, weak cryptography, and reconnaissance patterns, but the reviewed locations are Markdown prose or fenced JSON/YAML examples. No executable code, shell command construction, cryptographic implementation, reconnaissance logic, network calls, environment access, or prompt injection text was found. The skill is safe to publish with the static findings dismissed as false positives.

## Stats

- - Views: 218
- - Downloads: 8
- - Favorites: 0
- - Popularity score: 0
