3

I am working to develop JSON-LD scripts for one of my hotel client but stumbled upon the "Rooms" page in the website.

The Google policies say:

When you have multiple entity types on a page, we recommend you mark up all entities on that page to help Google algorithms better understand and index your content.

HTML tagging seems simple for this purpose, but how can we use JSON-LD to mark multiple rooms, their types, prices etc. when they are in single page?

I am using the Product type for the time being, since something like a "Hotel Room" type does not exists yet in Schema.org.

PS: Creating individual page for each room seems not a very good option to me.

EDIT:
I am aware of this question, but that's specific to a webpage containing several videos and does not correctly addresses the case I've raised in this question.

unor
  • 92,415
  • 26
  • 211
  • 360
Amit Mittal
  • 1,129
  • 11
  • 30
  • Possible duplicate of [JSON-LD Schema.org: Multiple video/image page](http://stackoverflow.com/questions/30505796/json-ld-schema-org-multiple-video-image-page) – unor Nov 11 '15 at 11:02

1 Answers1

0

My answer to the linked question describes three ways how multiple nodes can be specified in JSON-LD:

  • if there is a suitable property: in an array as value of the property
  • if there is no suitable property: as top-level items (either in @graph or in separate script elements)

If one page is for multiple rooms, you could use CollectionPage and provide an ItemList as mainEntity, where each room is a list entry.

So in JSON-LD, itemListElement would get an array as value (first example in my linked answer).

(Note that some time after you asked the question, Schema.org introduced the HotelRoom type. This can be used together with Product, as described on Markup for Hotels.)

unor
  • 92,415
  • 26
  • 211
  • 360