Of course you can simply provide the ListItem
for the last item and omit the @id
:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "http://www.example.com/",
"name": "Home"
}
}, {
"@type": "ListItem",
"position": 2,
"item": {
"@id": "http://www.example.com/brands",
"name": "Brands"
}
}, {
"@type": "ListItem",
"position": 3,
"item": {
"name": "My Brand"
}
}]
}
</script>
That is valid JSON-LD and fine according to Schema.org.
However, I would add the URL of the last/current item anyway. In case of RDFa or Microdata, I would have used the link
element for the last item’s URL (so the URL is not clickable for human visitors, but bots have more data), but in case of JSON-LD, this problem isn’t relevant in the first place, as the human visitors typically don’t interact with it.
The only conceivable downside could be that a consumer gets confused if the content in the HTML doesn’t match the content in JSON-LD (i.e., the URL for the last item is missing). But I’d consider this risk pretty low, as it should be well known that there are different ways how to handle the last breadcrumb item.
As far as documentation goes, Schema.org only says that the BreadcrumbList
is "typically ending with the current page".
And as an example for a consumer, Google says the same for their Breadcrumbs feature:
The breadcrumb trail may include or omit a breadcrumb for the page on which it appears.
But they don’t say anything about the case where the last item is included without its URL.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…