Several JSON-LD scripts for different Schema.org types: why they're combined into one type when testing with Google SDTT?

Viewed 212

I have an article containing the review of a car and a video, and I want to implement the following Schema.org types, with JSON-LD: Article, VideoObject and Review.

I created the following separate snippets for each Schema.org type:

(1) Article:

<script type="application/ld+json">
{ "@context": "https://schema.org", 
 "@type": "Article",
 "name": "TitleOfArticle",
  "headline": "TitleOfArticle",
 "description": "DescriptionOfArticle",
 "image": {
    "@type": "ImageObject",
    "url": "https://www.example.com/imageofcarinarticle.png",
    "width": 1200,
    "height": 800
  },
  "author": {
    "@type": "Person",
    "name": "John Smith"
  },
"wordcount": "628",
"publisher": {
    "@type": "Organization",
    "name": "MyCompany",
    "logo": {
      "@type": "ImageObject",
      "url": "https://www.example.com/companylogo.png"
    }
  },
 "url": "https://www.example.com/articleurl",
   "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://www.example.com/articleurl"
  },
  "datePublished": "2019-09-16T11:30:19",  
  "dateCreated": "2019-09-16T11:30:19",
  "dateModified": "2019-09-16T11:30:19",
  "thumbnailUrl": "https://www.example.com/imageofcar.png"
 }
</script>

2) VideoObject

<script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "VideoObject",
      "name": "TitleOfArticle",
      "@id": "https://www.example.com/articleurl",
      "datePublished": "2019-09-16T11:30:19",
      "uploadDate": "2019-09-16T11:30:19",
      "duration": "PT5M33S",
      "description" : "DescriptionOfArticle",
      "thumbnailURL" : "https://www.example.com/thumbnailurl.png",
      "thumbnail" : "https://www.example.com/thumbnailurl.png",
      "contentUrl": "https://www.example.com/videourl.mp4",
      "author": {
        "@type": "Person",
        "name": "John Smith"
      }
    } 
</script>

3) Review

<script type='application/ld+json'>
{
  "@context": "https://schema.org/",
  "@type": "Review",
  "itemReviewed": {
    "@type": "Car",
    "name": "Mini Countryman",
    "model": "Countryman",
    "manufacturer": "Mini",
    "bodyType": "hatchback",
    "vehicleModelDate": "2019"
  },
  "author": {
    "@type": "Person",
    "name": "John Smith"
  },
  "image": {
    "@type": "ImageObject",
    "url": "https://www.example.com/imageofcarinarticle.png",
    "width": 1200,
    "height": 800
  },
  "publisher": {
   "@type": "Organization",
    "name": "MyCompany",
    "logo": {
      "@type": "ImageObject",
      "url": "https://www.example.com/companylogo.png"
    }
  },
  "@id": "https://www.example.com/articleurl",
  "headline": "TitleOfArticle",
 "description": "DescriptionOfArticle",
  "datePublished": "2019-09-16T11:30:19",
  "dateModified": "2019-09-16T11:30:19",
  "reviewBody": "ReviewOfCar",
  "reviewRating": {
    "@type": "Rating",
    "ratingValue": "6.0",
    "bestRating": "10"
  }
}
</script>

When I test each script separately with Google Structured Data Testing Tool everything is fine, with no errors.

If I test all the scripts in the same page, I still get no error, but all types are ‘combined’ into one type, Article, as in the image below.

Image

Is that correct?

I seem to remember having separate types, Article, VideoObject and Review while using in the past Microdata instead of JSON-LD.

1 Answers

@id uniquely identifies a thing, so if two things have the same @id value, they are the same.

Your WebPage, VideoObject and Review have the same @id value:

"@id": "https://www.example.com/articleurl"

If you want to provide @ids (which is a good practice), they should all have different values, unless they really are the same.

Related