4

This question already has an answer here:

How do I display multiple book authors using JSON-LD?

This question is similar to my original question, but decided to create a different one seeing that 2 different formats are used.

Here is my post using microdata:

schema.org/Book with multiple authors

My question is similar. I have a book with multiple authors. Am I doing it correctly by displaying the author property more than once? Below is the code using JSON-LD:

<script type="application/ld+json">
{
     "@context": "http://schema.org",
     "@type": "WebPage",
     "mainEntity": {
          "@type": "Book",
          "author": {
               "@type": "Person",
               "familyName": "van der Westhuizon",
               "givenName": "Jason",
               "name": "Jason van der Westhuizon"
          },
          "author": {
               "@type": "Person",
               "familyName": "du Toit",
               "givenName": "Jene",
               "name": "Jene du Toit"
          },
          "author": {
               "@type": "Person",
               "familyName": "September",
               "givenName": "Koos",
               "name": "Koos September"
          },
          "bookFormat": "http://schema.org/Paperback",
          "datePublished": "2014-11",
          "inLanguage": "en",
          "isbn": "1234567890123",
          "name": "My Book Name",
          "numberOfPages": "381",
          "publisher": {
               "@type": "Organization",
               "name": "My Publisher"
          },
     }
}
</script>

The reason why I ask is because when I go to Google's structured data tester tool then in the results it only shows one author. Why doesn't it display all 3? Is my code wrong?

marked as duplicate by unor, John Conde Feb 19 '16 at 14:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5

your code contains error, thats why two authors aren't recognized. If you have more then one author, you should add them as list without entity duplication. Here the correct code:

<script type="application/ld+json">
{
     "@context": "http://schema.org",
     "@type": "WebPage",
     "mainEntity": {
          "@type": "Book",
          "author": [{
               "@type": "Person",
               "familyName": "van der Westhuizon",
               "givenName": "Jason",
               "name": "Jason van der Westhuizon"
          },
          {
               "@type": "Person",
               "familyName": "du Toit",
               "givenName": "Jene",
               "name": "Jene du Toit"
          },
         {
               "@type": "Person",
               "familyName": "September",
               "givenName": "Koos",
               "name": "Koos September"
          }],
          "bookFormat": "http://schema.org/Paperback",
          "datePublished": "2014-11",
          "inLanguage": "en",
          "isbn": "1234567890123",
          "name": "My Book Name",
          "numberOfPages": "381",
          "publisher": {
               "@type": "Organization",
               "name": "My Publisher"
          }
     }
}
</script>

Not the answer you're looking for? Browse other questions tagged or ask your own question.