It appears as though Google has now implemented Schema.org version 2 and Google's own examples fail Google's validation test. For example, here's is Google's example JSON-LD code for breadcrumbs:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://example.com/arts",
"name": "Arts"
}
},
{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "https://example.com/arts/books",
"name": "Books"
}
},
{
"@type": "ListItem",
"position": 3,
"item": {
"@id": "https://example.com/arts/books/poetry",
"name": "Poetry"
}
}
]
}
</script>
Yesterday, when I pasted the above code into a test.html
file, Google's validation tool validated it as a "Pass".
Today, it fails. It appears that you now have to explicitly define a mainEntity
. But they haven't bothered to update their docs.
Does anyone know where to find the official documentation on using JSON-LD? Schema.org doesn't offer much and appears to also be out-dated. I managed to get the following code to pass the test:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"mainEntity": {
"@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/shop.com",
"name": "Shop"
}
}
]
}
}
</script>
What I'm worried about this is:
Let's say you also define a product on the same page, using microdata, will the search engines treat the breadcrumb list as the mainEntity
? i.e. Will it rank higher in search results, than the product will?
BreadcrumbList
and Microdata for theProduct
? – Buote