Structured data
How to validate schema markup and fix JSON-LD errors
Validate schema in three layers: JSON syntax, Schema.org vocabulary and factual agreement with the rendered page. Start with the deployed canonical URL, not a snippet from the content management system. Fix parsing failures first, then broken types and relationships, and finally warnings that matter to the page's purpose. A green validator does not prove truth or eligibility. Schema must match visible page facts and is not a guaranteed AI ranking factor.
Capture what production actually serves
Fetch raw HTML and inspect the rendered document because applications may inject, duplicate or remove JSON-LD after load. Record status code, final URL, canonical declaration and every application/ld+json block. Test public pages in a clean session without employee cookies. If markup depends on an API, consent state or selected variant, reproduce those conditions and decide which state the canonical page represents. Validation against a local component can miss serialization, escaping, caching and deployment problems introduced later in the delivery path.
Triage errors in dependency order
- Repair invalid JSON: trailing commas, unescaped characters, broken quotes and incomplete objects.
- Confirm every @type and property belongs in the intended vocabulary and has the expected value shape.
- Resolve dangling @id references, duplicated entities and identifiers reused for different things.
- Check absolute URLs, image accessibility, currency codes, dates and numeric formats.
- Compare names, prices, ratings, availability, addresses and answers with visible page content.
- Review product-specific search documentation separately from general Schema.org validity.
Paste a representative snippet or URL into the schema validator, and use the schema generator when a damaged graph is simpler to rebuild cleanly. Treat warnings as prompts for judgment, not invitations to invent data. An optional field should remain absent when the business cannot support it. If two validators disagree, determine whether one is testing generic vocabulary and another a product-specific feature. Document the chosen interpretation, source documentation and expected output so the warning does not reopen every sprint.
Turn manual debugging into regression coverage
- Select fixtures for major templates and difficult states such as no stock, no reviews and holiday closure.
- Parse every JSON-LD block in continuous integration and fail on syntax errors.
- Assert critical @ids, types, required business fields and visible-to-markup equality.
- Crawl a production sample after release to catch rendering and caching differences.
- Alert on sudden node-count changes, empty values, failed referenced URLs and stale timestamps.
- Review the test suite whenever the page model, vocabulary or business rules change.
After correcting material errors, run an AI visibility scan and use ModelSaid to retest questions dependent on the repaired facts. Preserve answers, citations, deployed version and validation result. Monitoring may show whether incorrect product, location or organization details persist, but it cannot isolate schema as the cause. Assistants may use visible copy, merchant feeds, external publishers, caches or model knowledge. The operational win is a reliable evidence layer and a record of what changed, regardless of whether answer behavior moves immediately.
Prioritize fixes by user harm and propagation risk. A malformed optional image field is usually less urgent than a wrong medical service location, unavailable product marked in stock or misleading price. Check whether the defect affects one record, one template or the shared data source before patching individual pages. A template-level fix should include samples that prove it does not break other entity types. For factual mismatches, correct the authoritative source first and regenerate dependent markup. This root-cause approach prevents a nightly feed or content deployment from recreating the same error after the validator has briefly turned green. Add the discovered state to regression fixtures so unusual but legitimate pages remain covered. Revalidate both the corrected URL and a control sample from every template that shares the modified serializer or data mapping.
Close errors with evidence, not just a green icon
A schema issue is resolved when production markup parses, uses coherent entities, reflects the canonical visible facts and survives relevant page states. Keep a ticket link, affected templates, example URLs, root cause and regression test with the fix. Recheck at scale after migrations and template refactors. Do not promise rich results or AI placement based on validation, because downstream systems choose what they support and use. Validation is quality assurance: it reduces avoidable ambiguity and makes structured data trustworthy enough to maintain.
Is your business visible in AI search?
Run a free check and see what ChatGPT, Claude, Gemini and Perplexity actually say about you right now.
Check your business for free