JSON-LD Schema.org: Multiple video/image page

If you have multiple items as value of a property, you could use an array:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebPage",
  "video":
  [
    {
      "@type": "VideoObject"
    },
    {
      "@type": "VideoObject"
    }
  ]
}
</script>

If you have multiple items on the top-level (not as value of a property), you could use a (named) graph and an array:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@graph": 
  [
    {
       "@type": "VideoObject"
    },
    {
       "@type": "VideoObject"
    }
  ]
}
</script>

And you could of course use multiple script elements:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebPage",
  "video": 
  {
    "@type": "VideoObject"
  }
}
</script>

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebPage",
  "video": 
  {
    "@type": "VideoObject"
  }
}
</script>

Leave a Comment