我需要組合兩組JSON-LD,以便它們位於同一頁面上。無論是個人還是當地企業。目標並不一定與2相關,但它們一起出現。如何合併2個JSON-LD模式類型?
下面是組#1:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Person",
"name": "John Doe",
"jobTitle": "Graduate research assistant",
"affiliation": "University of Dreams",
"additionalName": "Johnny",
"url": "http://www.example.com",
"address": {
"@type": "PostalAddress",
"streetAddress": "1234 Peach Drive",
"addressLocality": "Wonderland",
"addressRegion": "Georgia"
}
}
</script>
下面是組#2:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Restaurant",
"address": {
"@type": "PostalAddress",
"addressLocality": "Sunnyvale",
"addressRegion": "CA",
"postalCode": "94086",
"streetAddress": "1901 Lemur Ave"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4",
"reviewCount": "250"
},
"name": "GreatFood",
"openingHours": [
"Mo-Sa 11:00-14:30",
"Mo-Th 17:00-21:30",
"Fr-Sa 17:00-22:00"
],
"priceRange": "$$",
"servesCuisine": [
"Middle Eastern",
"Mediterranean"
],
"telephone": "(408) 714-1489",
"url": "http://www.dishdash.com"
}
</script>
眼下組#1和使用Google's Structured Data Testing Tool組#2驗證單獨。
試圖將這些組合在一起,只有頂部組驗證。另一個不顯示。
幫助!這兩個組怎麼可以組合在正確的方式?