2

Do search engines treat both examples the same?
If yes, is there any reason to choose one over the other?
If no, what are the differences?

Not nested structured data:

[{
    "@context": "http://schema.org",
    "@type": "WebPage",
    ...
},{
    "@context": "http://schema.org",
    "@type": "BreadcrumbList",
    ...
},{
    "@context": "http://schema.org",
    "@type": "VideoObject",
    ...
}]

Nested structured data:

[{
    "@context": "http://schema.org",
    "@type": "WebPage",
    "breadcrumb": {
        "@type": "BreadcrumbList", 
        ...
    },
    "video": {
        "@type": "VideoObject",
        ...
    },
    ...
}]
Ronen Teva
  • 1,345
  • 1
  • 23
  • 43

1 Answers1

4

They are not equivalent.

The first example only conveys that there are three entities: a WebPage, a BreadcrumbList, and a VideoObject. But they are not related in any way.

The second examples conveys that there are three entities (the same as in the first example), but they are related (thanks to using the properties breadcrumb and video): the Webpage entity has breadcrumbs and an embedded video.

So using the second example is of course preferable.

Note that you don’t have to nest to convey this. You can also use the structure from the first example and give each node a URI (with @id) and then use these URIs as values for the properties (example). But nesting might be better supported by consumers.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • Thank you for your answer! Is there any situation where using the first option is preferred? Using Google's [Structured Data Testing Tool](https://search.google.com/structured-data/testing-tool/u/0/) I can only see 1 item, the WebPage, and I wonder if Google might not index the breadcrumb if it's not a separate entity. – Ronen Teva Jul 12 '16 at 13:08
  • @RonenTeva: You see only one *top-level* item. The other items are correctly nested in this item. Without using properties like `breadcrumb`, search engines couldn’t even know for sure that the `BreadcrumbList` should be the breadcrumbs for the page. So no, it doesn’t make sense to omit properties. Think of `Person` and `Book`. What would it mean without a property? The person could have authored the book, or read the book, or offered the book … but when using the [`author`](http://schema.org/author) property, you make it clear. – unor Jul 12 '16 at 13:18
  • Any suggestions how to connect `BreadcrumbList` with `Article`? [Follow up question](http://stackoverflow.com/questions/38352939/schema-org-json-ld-how-to-set-breadcrumbs-for-an-article) – Ronen Teva Jul 13 '16 at 16:57