Invalid structured data

schema/invalid

The page's JSON-LD does not parse, or lacks a property its type requires, such as a Product without a name. Search engines and AI answers skip data they cannot read.

Severity
Medium
Area
Structured data
Checked
Weekly, and with Check now
Health score
Weight 2
Scope
Each page; past 10 pages, one finding for the site

How Talewright checks it

The weekly crawl parses every JSON-LD block and checks the required properties of common types, such as Organization, Product and Article.

How to fix it

Fix the JSON-LD so it parses and has the properties its type requires.

The problem

A <script type="application/ld+json"> block on the page is broken in one of two ways.

  • It does not parse. JSON is stricter than the JavaScript it resembles. A trailing comma, a single-quoted string, an unquoted property name or a comment is enough to make the whole block unreadable. Templates are a common source: a loop that leaves a comma after the last item, or a value inserted without escaping its quotes or line breaks.
  • It parses, but a required property is missing. The type is named, yet the property that makes it useful is absent or empty, such as a Product with no name. Often a template field was empty for that page.

A parser that hits a syntax error cannot recover the rest of the block, so one stray comma loses every value in it.

Why it matters

Google uses structured data as explicit clues about what a page means, and recommends JSON-LD as the format. Markup that does not parse gives it nothing at all. A block that parses but lacks its type’s basic properties, such as a Product without a name, says little that a machine can use.

Talewright checks its own minimum of required properties for these types. Google’s documentation for each rich result lists its own required properties, which can differ.

Type Required by the check
Organization name
WebSite name, url
Article, BlogPosting headline
Product name
BreadcrumbList itemListElement
FAQPage mainEntity
Event name, startDate, location
LocalBusiness name, address

The cost is quiet. Visitors see a normal page, so nobody notices that the product’s price, the article’s date or the organization’s logo never reached a machine. A broken block also hides behind a working one: a page can carry valid Organization markup and a broken Product block, and only the second fails.

Fixing it

  1. Copy each JSON-LD block from the served HTML (view source or curl, not the browser’s inspector) and run it through a JSON parser, such as JSON.parse or jq. The error points to the line.
  2. Fix the syntax: remove trailing commas, use double quotes for every string and property name, and drop comments.
  3. In the template, build the block as a data object and serialize it with the language’s JSON encoder instead of writing JSON by hand. That handles commas and escaping.
  4. Add the properties the finding lists as missing. For a Google rich result, also add the properties its documentation requires; a merchant listing Product, for example, needs name, image and offers.
  5. Test with Google’s Rich Results Test or the Schema Markup Validator.

Failing, a block that does not parse because of a trailing comma:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Example Desks",
}
</script>

Failing, a block that parses but has no name:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "image": "https://example.com/images/oak-desk.jpg",
  "offers": { "@type": "Offer", "price": 890, "priceCurrency": "USD" }
}
</script>

Passing:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Oak writing desk",
  "image": "https://example.com/images/oak-desk.jpg",
  "offers": { "@type": "Offer", "price": 890, "priceCurrency": "USD" }
}
</script>

The block usually comes from a page template or layout component, an SEO or schema plugin, or a tag manager. Fix it at the source that writes it, then check one page of every template that uses it.

Ask your agent

Some pages on this website have JSON-LD that does not parse or lacks required properties. Find every place that writes <script type="application/ld+json"> (templates, components, plugins). Replace hand-written JSON with an object serialized by the language's JSON encoder, so commas and escaping are always correct. Make sure each block has these properties for its type: Organization name; WebSite name and url; Article and BlogPosting headline; Product name; BreadcrumbList itemListElement; FAQPage mainEntity; Event name, startDate and location; LocalBusiness name and address. Build the website, extract every JSON-LD block from the served HTML of one page per template, parse each with a JSON parser, and list the type and properties of each block.

Common mistakes

  • Escaping values for HTML instead of JSON. A quote or a line break in a product name must be escaped as JSON.
  • Validating the template source. Validate the output for a real page, where the empty fields show up.

See also the AI search guide.

Sources

Updated 2026-11-30. Rule version 1.

Get early access.

Talewright is invite-only. Tell us about your team and the marketing you want to win.