Mobile app version of vmapp.org
Login or Join
Cugini213

: Schema markup (JSON-LD) for multiple reviews on one page According to Google this is a typical review markup in JSON-LD <script type="application/ld+json"> { "@context": "http://schema.org/",

@Cugini213

Posted in: #JsonLd #Markup #SchemaOrg

According to Google this is a typical review markup in JSON-LD

<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Review",
"itemReviewed": {
"@type": "Thing",
"name": "Super Book"
},
"reviewRating": {
"@type": "Rating",
"ratingValue": "7",
"bestRating": "10"
},
"author": {
"@type": "Person",
"name": "Joe"
},
"publisher": {
"@type": "Organization",
"name": "Washington Times"
}
}
</script>


I have multiple reviews of different (but similar) products on the same page.
One solution would be to have a different script for each review. But since the author and publisher are the same for all reviews and only the item reviewed and rating change, I wonder if I could have a combined, more compact script.

I have read this similar question, but my question is more complicated.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cugini213

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

You can provide multiple Review items (in the same script element or in multiple script elements), but you can’t define a property once and let all your items "inherit" it. Microdata and RDFa would allow this to some extent.

What you can do: give the Person and Organization items an URI and provide this URI as value for the author and publisher properties.

So you would still have to to provide author/publisher for each Review, but instead of repeating the data, you just "link" to it:

"author": {"@id": "/authors/joe#i"},
"publisher": {"@id": "/publishers/washington-times#this"}


Note that not necessarily all consumer support this, of course. Some may only support it if the referenced items are defined on the same page, some not at all.

It’s also possible to mix both ways: provide the URI of the item (ideally pointing to a page where the full data about it is provided), and define important properties in addition, too.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme