Structured-Data-JSON-LD
Structured-Data-JSON-LD copied to clipboard
Why are WebPage and WebSite in an array, vs WebSite.hasPart: [WebPage, ...]?
To state practically, why this: https://github.com/JayHoltslander/Structured-Data-JSON-LD/blob/master/WebSite.json#L3-L13
{
"@context": "http://schema.org",
"@type": "Webpage",
"specialty": "CNBC homepage, stock markets, business news, financial news",
"mainContentOfPage": {
"@context": "http://schema.org/",
"@type": "WebPageElement",
"cssSelector": ".body-content"
},
"primaryImageOfPage": "https://placehold.it/640x480"
},
Instead of
@context": "http://schema.org",
"@type": "WebSite",
"hasPart": [
webpageDefFromExampleAbove,
...footerSidebarAndHeaderElements,
]
The reason I ask is a more complicated example, say you had this chain of items:
a Character (person) featured on a VisualArtwork (comic page) within a ComicStory, within a ComicIssue, within a Book, within a BookSeries, within a WebPage, within a WebSite...
Would you just define all of these types as first level items within a 1D array (as the Webpage/WebSite example cited in original post)? Or would it be better to nest everything into a single WebSite object?