Structured data validated; no syntax errors or missing required properties
Why it matters
A single JSON syntax error in any structured data block silently invalidates that block for every search engine parser. Schema.org parsers do not partially parse malformed JSON — a missing closing brace or an unescaped character drops the entire block. Beyond syntax, schema-org DataType validation failures (wrong property types, empty required fields) prevent Rich Results without any visible error. These failures are invisible in the browser because JavaScript often doesn't execute JSON-LD, and they go undetected until a Search Console structured data report surfaces them — often weeks after deploy.
Severity rationale
High because a single parse error silently drops an entire schema block from all search engine indexing, causing complete Rich Results loss with no visible symptom.
Remediation
Run validation before deploying schema changes. Use the Google Rich Results Test (https://search.google.com/test/rich-results) for deployed pages, and validate raw JSON-LD blocks locally with a JSON linter. In your CI pipeline, add a schema validation step against your page components (e.g., app/blog/[slug]/page.tsx).
For programmatic validation in Node.js:
// scripts/validate-schema.ts
import { readFileSync } from 'fs'
const raw = extractJsonLd(pageHtml) // your extraction logic
try {
const parsed = JSON.parse(raw)
if (!parsed['@context'] || !parsed['@type']) {
throw new Error('Missing @context or @type')
}
console.log('Schema valid:', parsed['@type'])
} catch (e) {
console.error('Schema parse error:', e.message)
process.exit(1)
}
Fix syntax errors at the source — never patch JSON-LD strings with string manipulation.
Detection
- ID:
structured-data-valid - Severity:
high - What to look for: Count all JSON-LD blocks across the site. For each block, attempt to parse as JSON and enumerate any syntax errors found. For each valid block, count the required properties per Schema.org type and verify no generic fallback types (e.g.,
Thing) are used where specific types apply. - Pass criteria: 100% of JSON-LD blocks are syntactically valid JSON with zero parse errors. Required properties are present per type for at least 90% of blocks. No generic
Thingtypes where specific types apply. Report: "X JSON-LD blocks validated, 0 syntax errors, Y of X have complete required properties." - Fail criteria: At least 1 JSON syntax error in any block, or more than 10% of blocks missing required properties, or generic
Thingtype used on a page with identifiable specific content type. - Skip (N/A) when: No JSON-LD schema present on any page.
- Detail on fail:
"Product schema JSON on /products/item1 is missing 'url' property"or"Invalid JSON in BlogPosting schema on /blog/post-3 (unterminated string)". - Remediation: Validate schema using the Google Rich Results Test or schema.org validator. Fix syntax errors in the JSON-LD blocks in your page components (e.g.,
app/blog/[slug]/page.tsx).
External references
- schema-org · DataType — Schema.org data types and required property validation
Taxons
History
- 2026-04-18·v1.0.0·Initial import from seo-advanced·automated