Validating Structured Data Before You Ship It
September 6, 2026 · 2 min read
Photo by Jakub Żerdzicki on Unsplash
Structured data has an unusual failure mode: broken JSON-LD doesn't break your page. It doesn't throw a console error a typical QA pass would catch, doesn't affect anything a visitor sees, and doesn't show up in a normal visual review. It just quietly fails to register with search engines — the schema you spent time adding does nothing, and nothing about the page tells you that. (If you're still deciding which schema types are even worth adding, start there.)
Where the syntax errors actually come from
JSON-LD is, underneath the schema.org vocabulary, just JSON — and JSON is unforgiving about a few specific mistakes that are easy to make when generating it dynamically from a template:
- A trailing comma after the last property in an object (valid in JavaScript object literals, invalid in strict JSON)
- An unescaped quote inside a string value — a product name or review quote containing a straight double-quote character breaks the surrounding JSON string
- A value that should be a string but gets interpolated as
undefinedornullwith no quotes around it, because the underlying data was missing and the template didn't guard for that case
Every one of these produces syntactically invalid JSON. A browser will still render the page fine, because the <script type="application/ld+json"> tag's content is opaque to everything except a JSON parser looking specifically for structured data.
The type-level mistakes are quieter still
Beyond outright broken syntax, there's a second failure mode that's syntactically valid but semantically wrong: using a required property incorrectly, nesting a type where a different type was expected, or referencing a schema.org type that doesn't exist. This won't throw a JSON parsing error — the data is valid JSON — but it also won't produce the rich result it was meant to unlock, because it doesn't actually conform to what that schema type requires.
Make validation a real step, not an assumption
The fix isn't complicated, but it has to actually happen: run every page template that emits structured data through a real validator — one that checks against the actual schema.org type definitions, not just "is this valid JSON" — before considering the implementation done. This is worth doing for a handful of representative pages per template, not just one, since dynamic templates can produce valid output for a data-complete page and broken output for an edge case (a product with no price, a review with no author) that a single test page didn't happen to exercise.
A good habit, once structured data is live: revisit it after any change to the underlying data model, template, or CMS field structure. Schema markup is exactly the kind of thing that silently rots — it worked when it shipped, nothing visibly changed for anyone, and six months later it's been broken since an unrelated field rename. MarketMan's SEO audit flags pages with no detectable structured data, which at least tells you when a template stopped emitting it.
See what MarketMan finds on your own site.
Enter your URL and get your first SEO, accessibility, and performance scan free.