Validate JSON-LD in three layers: JSON syntax, the intended vocabulary and Google feature eligibility. Passing the first layer does not pass the other two. Compare the markup with the visible page content before treating a validator result as a publish decision.
Keep the validation questions separate
| Layer | Question | Evidence |
|---|---|---|
| Syntax | Does the document parse as JSON? | Parser result |
| Vocabulary | Are types and properties meaningful for the intended entity? | Current schema vocabulary and value checks |
| Google eligibility | Does the page meet the supported feature rules? | Current feature documentation and appropriate test |
| Visible-content alignment | Does the page actually show the marked-up information? | Page/source comparison |
Use a fixture that passes only the first layer
import json
fixture = json.loads('{"@context":"https://schema.org","@type":"NotARealType","name":"Fixture"}')
assert isinstance(fixture, dict)
# JSON parsing succeeded. Vocabulary and feature eligibility are still unresolved.
This example demonstrates a boundary, not a full schema validator. A syntactically valid invented type is still unsuitable markup. Keep current vocabulary and feature checks outside the JSON parser.
Validate after the page is published
Inspect the rendered page and extracted JSON-LD, confirm its URL and supported content, and use the relevant Google testing tool for the feature being implemented. Do not add unsupported author, review or FAQ information solely to satisfy a template.
Valid structured data does not guarantee a rich result, a ranking improvement or an AI citation. The implementation guide covers creating markup; this page covers the acceptance layers.
Reference documentation: developers.google.com — /search/docs/appearance/structured-data/intro-structured-data; schema.org — /docs/schemas.html.