JSON-LD valid: what the check tests and how to fix it

Passes when every page with parseable JSON-LD has a schema.org @context and a string @type. Skipped if no page has JSON-LD. Not a vocabulary validator.

Structured Data · Weight 1 in the w2agent Score

How common is it?

51% of 820 measured sites where this check applied pass.

Latest audit of each site under rubric v3.1. Sites where the check did not apply or could not be measured (for example, no llms.txt for the llms.txt checks) are left out. A partial result does not count as a pass.

What this check tests

This check only runs on pages where the audit found at least one JSON-LD block that parsed as JSON (see Schema.org JSON-LD present). Pages with none are not counted. A block with a JSON syntax error never reaches this check, so a broken file shows up as a missing block on the presence check, not as invalid here.

For each such page the audit asks two questions across all of the page's blocks:

  • Does at least one block have an @context whose text form contains schema.org? An array of strings passes if any entry contains it. An object-valued @context, such as an inline term map, turns into the text [object Object] and fails.
  • Does at least one block have an @type that is a plain string?

The page is valid only if both answers are yes. They can come from different blocks, so a block with only @context and another with only @type together pass.

  • Pass: every page with JSON-LD is valid.
  • Partial: some are, some are not.
  • Fail: JSON-LD exists but no page is valid.
  • Skip: no page has JSON-LD. The result says "No JSON-LD found to validate". A skip is not a failure, and the adoption figure on this page counts only sites where it ran.

This is a structural check, not a schema.org validator. It does not look up the type, check property names, check value types or check required fields. A block with "@type": "Artcle" passes. Two common, well-formed patterns fail it. One is a top-level @graph: {"@context": "https://schema.org", "@graph": [ ... ]} has no top-level @type, because the types sit inside the graph nodes, so the page fails unless another block has one. The other is an @type written as an array such as ["Organization", "LocalBusiness"], which is not a string.

Why it matters to agents

JSON-LD is only useful if a parser can tell which vocabulary the keys come from and what kind of thing each object is. In JSON-LD, @context is what maps short names like name to full identifiers, and @type states the type of a node. Without them the block is just JSON with ordinary keys.

Google lists the Rich Results Test and the URL Inspection tool as the way to test compliance with its technical guidelines, and says they catch most technical errors. Those tools are stricter and more meaningful than this check. Treat this check as a smoke test for the two keys parsers rely on. It has weight 1 and error severity when it is not fully passing.

How to fix it

  1. Open the page source and find each <script type="application/ld+json"> block.
  2. Give every block "@context": "https://schema.org" as a plain string.
  3. If a page has a single block, give it a top-level string @type. If you use @graph, add a second small block with a top-level @type (for example WebPage) so the check can see one, or flatten the main node out of the graph. Both forms are valid JSON-LD; the second is only to satisfy this check's reading.
  4. Replace array @type values with the single most specific type, or split the node into two blocks.
  5. Run the URL through Google's Rich Results Test for real validation of types and properties.

If the result is a skip, nothing needs fixing here. Add markup first with Schema.org JSON-LD present. See Appropriate Schema.org type for the type list and Schema.org completeness for the field list.

Examples from measured sites

Up to 10 of the highest-scoring sites in each group, from recent audits. Failing includes partial results.

Passing

Failing or partial

Sources

Verified against these sources on

Does your site pass this check?

Check your own site →