2015-09-29 4 views
10

Kann ich mehrere JSON-LD-Gruppen (mit Schema.org) auf derselben Seite verwenden?Mehrere JSON-LD-Tag-Gruppen auf einer Seite

Wenn ich nicht kann, wie man sie zusammen kombiniert? Ich bin nicht so vertraut mit der Syntax.

Gruppe 1:

<script type="application/ld+json"> 
{ 
    "@context": "http://schema.org", 
    "@type": "LocalBusiness", 
    "address": { 
    "@type": "PostalAddress", 
    "streetAddress": "3102 Highway 98", 
    "addressRegion": "FL", 
    "addressLocality": "Mexico Beach", 
    "postalCode": "45252", 
    "addressCountry": "US", 
    }, 
    "geo": { 
    "@type": "GeoCoordinates", 
    "latitude": "40.75", 
    "longitude": "73.98" 
    }, 
    "name": "Beachwalk Beachwear & Giftware", 
    "telephone": "850-648-4200", 
    "email": "[email protected]", 
    "faxNumber": "860-562-4250", 

} 
</script> 

Gruppe 2:

<script type="application/ld+json"> 
{ 
    "@context": "http://schema.org", 
    "@type": "Organization", 
    "url": "http://example.com", 
    "name": "My Domain Title", 
    "logo": "http://example.com/wp-content/uploads/2015/08/abc.jpg", 
    "contactPoint": [ 
     { 
      "@type": "ContactPoint", 
      "telephone": "0192-39192130", 
      "contactType": "customer service" 
     }, 
     { 
      "@type": "ContactPoint", 
      "telephone": "0182-239120398", 
      "contactType": "customer service" 
     } 
    ], 
    "sameAs": [ 
     "http://facebook.com/myfbaccount", 
     "http://twitter.com/mytwitteraccount" 
    ] 
} 
</script> 
+0

möglich Duplikat [Beste JSON-LD Praktiken: mehrere

0

Gemäß der Spezifikation (https://www.w3.org/TR/json-ld/#h3_advanced-context-usage) die Verwendung von mehreren Kontexten ist möglich, mit einer einfachen Liste von Kontexten:

[ 
    { 
    "@context": "http://example.org/contexts/person.jsonld", 
    "name": "Manu Sporny", 
    "homepage": "http://manu.sporny.org/", 
    "depiction": "http://twitter.com/account/profile_image/manusporny" 
    }, 
    { 
    "@context": "http://example.org/contexts/place.jsonld", 
    "name": "The Empire State Building", 
    "description": "The Empire State Building is a 102-story landmark in New York City.", 
    "geo": { 
     "latitude": "40.75", 
     "longitude": "73.98" 
    } 
    } 
]