Skip to main content

validate-a-json-payload

Validate a JSON payload against syntax, schema, semantic invariants, size, encoding, and privacy requirements. Use when data crosses an API, queue, file, webhook, or storage boundary.

Quellinformationen

Repository
protosphinx/sphinxstack
Letzte Quellaktivität
29. Juli 2026 um 13:55
Erkannte Sprache von SKILL.md
Englisch
Sterne
3
Forks
0

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

Datei-Explorer
2 Dateien

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
validate-a-json-payload
category
code
description
Validate a JSON payload against syntax, schema, semantic invariants, size, encoding, and privacy requirements. Use when data crosses an API, queue, file, webhook, or storage boundary.
# validate-a-json-payload Valid JSON syntax does not prove valid domain data. ## When to use - Use before accepting, emitting, migrating, replaying, or debugging JSON. - Do not log secrets or personal data merely to explain validation failure. ## Preconditions - Obtain the payload safely, schema and version, boundary rules, size limits, and expected semantics. ## Procedure 1. Preserve a redacted sample and source metadata. 2. Check bytes, encoding, syntax, duplicate-key policy, depth, and size. 3. Validate required fields, types, enums, formats, ranges, nullability, and additional fields. 4. Apply semantic invariants across fields and referenced entities. 5. Check version compatibility, defaults, coercion, unknown-field, and numeric precision behavior. 6. Return bounded field errors without echoing sensitive values. 7. Test valid, boundary, malformed, oversized, adversarial, and old-version cases. ## Failure plan - Quarantine rather than partially process a payload whose required semantics are unresolved. ## Worked example A syntactically valid payment event fails because amount is negative, currency and minor units disagree, and an unknown version would be coerced silently. ## Done - A JSON validation report records schema version, syntax, field, semantic, compatibility, privacy, and size results - Boundary, malformed, adversarial, precision, unknown-field, and redaction tests verify safe handling
Auf GitHub ansehen