SiteAud!tLint Support

Warning Structured Data

Invalid JSON-LD

Severity
Warning
Impact
Medium
Effort to fix
Low
Issue code
schema_invalid

Why it matters

At least one JSON-LD block could not be parsed, so search engines will ignore it.

How to fix it

Fix the JSON syntax and validate the markup with the Rich Results Test or the Schema.org validator.

What this means

At least one <script type="application/ld+json"> block on the page is not valid JSON, so search engines cannot read it at all. The evidence shows how many blocks failed, for example "1 invalid block(s)".

This is a syntax check. A block that parses but uses the wrong types or properties is a separate matter for Google's Rich Results Test.

Why it matters

A JSON-LD block with a syntax error is ignored completely. Any rich result it was meant to produce, such as product prices, review stars, breadcrumbs or article details, is lost, and the page looks to search engines as if it has no markup at all.

Common causes

  • A trailing comma after the last property or array item. JSON does not allow it, even though JavaScript does.
  • Unescaped quotes in a value, usually a product name or description containing ", such as 27" monitor.
  • Line breaks or tabs copied into a value from a CMS field.
  • A template variable that printed nothing, leaving "price": , or "name": }.
  • HTML comments or JavaScript placed inside the script block.
  • Smart quotes (“ and ”) pasted from a word processor instead of straight quotes.

How to fix it

  1. Open the page source, copy the block, and paste it into any JSON validator to find the line and character of the error.
  2. Fix the template or plugin that generates the block, not the single page, because the same error usually repeats on every page of that type.
  3. Build JSON-LD with a JSON encoder, such as json_encode in PHP or JSON.stringify in JavaScript, rather than by joining strings. The encoder escapes quotes and line breaks for you.

Verify the fix

Recrawl. In the Structured Data view in Pages, the Invalid JSON-LD filter should be empty. Then check one page per template in Google's Rich Results Test to confirm the types and properties are also correct.

How it affects your score

Finding this issue on any page costs the Structured Data score 3 points, plus up to 12 more depending on the share of crawled pages affected. Weakens rankings, crawling or measurement. Fix after critical issues.

Find the affected URLs

Open Crawl > Issues and pick Invalid JSON-LD. Each affected URL is listed with its evidence, and Copy URLs or Export URLs hands the list to a developer. The issue also appears in the Action Plan, ranked by impact (medium) and effort (low), and in the issues CSV under the code schema_invalid. After fixing, run a new audit and use Compare to confirm the URLs moved to fixed.