0

I have created some Hotel schema, but want to include 3 as a list. The individual hotel schema works but using @graph and trying to include a list doesn't.

I cannot see what's wrong. The testing tool only shows the first Hotel and not the second.

<script type="application/ld+json">
{  
   "@context":"http://schema.org",
   "@graph":[  
  {  
     "@type":"Hotel",
     "name" : "The Hampshire Hotel",
 "description" : "A boutique hotel with 42 rooms, excellent value for money located just outside of St Helier.",
 "address" : { "@type" : "PostalAddress",
       "addressCountry" : "Jersey",
           "addressLocality" : "St Helier",
           "postalCode" : "JE2 4TB",
           "streetAddress" : "53 Val Plaisant"
         },
 "photo" : "TBC our image link",
 "telephone" :  "+441534 724 115",
 "PetsAllowed" : "No",
 "priceRange" : "£49 - £100",
 "starRating" :  "3*",
"amenityFeature" : [
"Swimming Pool",
"Bar & restaurant",
"Car parking",
"24hour service",
"Free Wifi"
]
  }
   ]
},      
  {  
   "@type":"Hotel",
     "name" : "The Club Hotel & Spa",
"description" : "A luxury boutique hotel in the heart of St Helier, offering outstanding restaurant, spa and swimming pools.",
"address" : { "@type" : "PostalAddress",
       "addressCountry" : "Jersey",
           "addressLocality" : "St Helier",
           "postalCode" : "JE2 4UH",
           "streetAddress" : "Green Street"
         },
  "photo" : "TBC our image link",
  "telephone" :  "+44 1534 876500",
  "starRating" :  "5*",
  "PetsAllowed" : "No",
"priceRange" : "£83 - £224",
 "amenityFeature" : [
"Swimming Pools",
"Spa",
"Bar & restaurant",
"24hour service",
"Free Wifi"
         ]
   }
   ]
}
</script>
2

You open two brackets without closing them, and they aren’t needed in the first place, so you have to remove them:

}
 ]

These are between the two Hotel nodes: between the ] (from amenityFeature) and the }, (that closes the first Hotel node).

  • Oh I see, I cannot tell where? – Becky Feb 11 at 14:36
  • @Becky: Between the two Hotel nodes: between the ] (from amenityFeature) and the }, (that closes the first Hotel node). – unor Feb 11 at 16:04
  • 1
    @Becky: You’re welcome. You can accept this answer to mark the question as solved. (I noticed that some of your other questions are also answered, so if the answers solved your question, please accept these, too.) – unor Feb 11 at 17:22
  • Hi @unor - sorry I didn't realise I needed to do this thanks – Becky Feb 13 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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