JSON-LD block without @context
What it is
A JSON-LD block on the page is valid JSON but has no @context at its top level. The context, almost always "https://schema.org", is what ties names such as Product and price to schema.org’s definitions. Without it, "@type": "Product" is only a word, not the schema.org Product type.
Why it matters
In JSON-LD , the context maps short names to full vocabulary terms, so a block without one does not, strictly read, describe schema.org entities at all. Parsers that follow the standard may then skip it, and it may not count toward the rich results or the page understanding Google draws from structured data . Adding it takes one line.
How Asky checks it
Asky reads only JSON-LD: each <script type="application/ld+json"> block in the page’s raw HTML, not microdata or RDFa, and not blocks added by JavaScript. Every top-level object needs its own @context: a single object, each item of a top-level array, or the object that wraps an @graph list, whose items then share it. A context only inside nested objects does not count. A top-level value that is not an object, such as null, is reported here and as missing @type. Each block is checked on its own, but the page carries one finding however many fail. Blocks that do not parse are reported as invalid JSON.
Reported as a warning with high severity.
How to fix it
- Find the block: search the page source for
application/ld+json. - Add
"@context": "https://schema.org"as the first property of the top-level object. - If the block is an array, add the context to every item, or turn it into one object with
@contextat the top and the items in an@graphlist, where one context covers them all, as below. - If you already use
@graph, put@contextnext to it: a graph without one is reported too. - If the context sits only inside nested objects, move it to the top level.
The two items from the example, rewritten as one graph:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"name": "Example Co",
"url": "https://example.com"
},
{
"@type": "WebSite",
"name": "Example Co",
"url": "https://example.com"
}
]
}
</script>Example
The homepage of https://example.com printed its Organization and WebSite items as a top-level list, [ ... ], each with a @type but neither with a context. Rewriting it as the single graph above clears the finding.