I'm finding it difficult to merge couple or several JSON-LD markups together being a novice. Could you please tell me what I'm doing wrong?
When I enter the following markup into Google Structured Data Testing Tool, it only shows results for the Organization
schema type while there's BreadcrumbList
type too.
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"legalName": "Example INC",
"logo": "https://www.example.com/image.png",
"url": "https://www.example.com/",
"sameAs": [
"https://www.facebook.com/example",
"https://www.linkedin.com/company/example",
"https://twitter.com/example",
"https://www.youtube.com/user/example",
"https://en.wikipedia.org/wiki/example"
]
}
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": "1",
"item": {
"@id": "https://www.example.com/",
"name": "Homepage"
}
}
]
</script>
For specifying multiple top-level items, you have three options:
<script type="application/ld+json">
[
{
"@context": "http://schema.org",
"@type": "Organization"
},
{
"@context": "http://schema.org",
"@type": "BreadcrumbList"
}
]
</script>
Drawback: You have to repeat the @context
for each item.
@graph
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@graph":
[
{
"@type": "Organization"
},
{
"@type": "BreadcrumbList"
}
]
}
</script>
script
elements<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization"
}
</script>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList"
}
</script>
Drawback: You have to repeat the script
element and the @context
for each item.
But it’s typically preferable to provide only one top-level item, and nest the additional items under suitable properties. This is not possible in all cases, though.
In your case it seems to be possible by adding a WebPage
item, assuming it’s the organization’s page and this page has this breadcrumb list:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"provider":
{
"@type": "Organization"
},
"breadcrumb":
{
"@type": "BreadcrumbList"
}
}
</script>
(You can achieve the same without nesting: give each item a URI with @id
, and then reference these URIs as property values.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With