Testing JSON-LD Like an API: 7 Checks Before Your Next Release
Treat JSON-LD as a release artifact, not as a code snippet added once. Before deployment, test that it parses, describes the same content users see, and remains consistent when a template or content field changes.
The seven checks
- Parse every generated JSON-LD block with the same fixture data used by the page template.
- Check required properties for the Schema.org type you selected.
- Compare headline, author, dates, URLs, and names with the rendered page.
- Test long text, missing optional fields, translations, and characters that can affect script serialization.
- Confirm that a route change cannot leave metadata from the previous page.
- Run the Schema.org Validator for vocabulary and structure, then use Google’s Rich Results Test when the type is supported.
- Review one rendered page per affected template before releasing the change.
Keep syntax separate from eligibility
Google recommends JSON-LD when a site can use it, but valid JSON does not guarantee a rich result. Google’s general structured data guidelines require the markup to represent the page accurately, and Google can still choose not to show a feature.
A small CI gate
| Check | Question |
|---|---|
| JSON parsing | Can the application output be read as JSON? |
| Schema.org Validator | Are the vocabulary and relationships structurally valid? |
| Rendered-page test | Does the markup match what visitors can see? |
| Rich Results Test | Does Google detect supported search markup and issues? |
This checklist tests implementation quality. It does not promise rankings, citations, or a rich result after deployment.
Keep the validation record with the route, rendered-page date, validator result, source data and reviewer decision. A syntax pass is evidence about syntax only; it does not establish eligibility or display in Google Search.
Choose the source of truth before writing markup
Every property in a JSON-LD block should have a visible or otherwise documented source of truth. For an Article, that normally means the rendered headline, author, publication date, canonical URL and the page itself. For an organisation or local business, it means controlled business data rather than an editor's guess. Define which system owns each field and what should happen when it is absent. Omitting an unsupported optional property is safer than inventing it to satisfy an example.
Test negative cases as well as happy paths
Release checks should include pages with a missing author, an unpublished date, a translated route, long text containing quotes, and an intentionally incomplete content record. The expected result is not always a complete schema object: sometimes the correct result is that a property is absent, a type is not emitted, or the release is held for editorial correction. Keep those decisions in the same record as the validator result so a later template change cannot silently turn a known exception into fabricated markup.
Use a release decision, not a validator screenshot
- Compare the generated block with the rendered route and its canonical URL.
- Save the validator outcome, including warnings that the implementation owner accepts or resolves.
- Record the content source and reviewer decision for every material field.
- Check a representative route in every affected language or template family.
- After deployment, retain the final URL, rendered date and any follow-up issue as the release evidence.
Google Search Central, Intro to How Structured Data Markup Works, accessed 2026-11-19; Google Search Central, General Structured Data Guidelines, accessed 2026-11-19; Schema.org, JSON-LD and type definitions, accessed 2026-11-19.
