Search code examples
schema.orgjson-ld

Adding a 'license' field to a schema.org Place record


I have a database of locations that I would like to publish as Open Data. each record can have one of several licenses depending on where the data was sourced from so each record needs to have a license attached. I'm publishing the data as json-ld. Sample record:

{
  "@context": "http://schema.org",
  "@type": "Place",
  "name": "METROPOLITAN MUSEUM OF ART",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "1000 5TH AVE",
    "addressLocality": "NEW YORK",
    "addressRegion": "NY",
    "addressCountry": "United States",
    "postalCode": "10028-0198"
  },
  "hasMap": "http://www.openstreetmap.org/?mlat=40.7784&mlon=-73.9627#map=15/40.7784/-73.9627",
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 40.7784,
    "longitude": -73.9627
  },
  "description": null,
  "telephone": "+1 (212) 472-2764",
  "url": "http://www.metmuseum.org",
  "openingHours": null,
  "photo": {
    "@type": "ImageObject",
    "contentUrl": "http://127.0.0.1:8888/fSunhLAJFSmnx55GNJee2-YKcgE=/1000x1000/museums/logos/000/149/449/original/NYC_-_Metropolitan_-_Temple_of_Dendur.JPG",
    "creator": "Jean-Christophe BENOIST",
    "license": "CC BY 3.0"
  }
}

The schema.org Place model doesn't have a field for 'license'. What is the correct way to add a license type field to the record? Essentially I want to embed a CreativeWork field in there if possible.


Solution

  • It seems that you want to provide a license for the document that is about the Place, not for the Place itself.

    So go with CreativeWork (or one of its sub-types, like WebPage if the document is a web page) and make use of its license property.

    To state that this CreativeWork is about the Place, you could use the about property, and to state that the Place is the primary entity described in this document, you could use the mainEntity property.

    If you want to keep Place as the top-level node, you could use JSON-LD’s @reverse for the about property, and use mainEntity’s inverse property, mainEntityOfPage.