Skip to content

Instantly share code, notes, and snippets.

@mattzeunert
Created April 26, 2019 08:55
Show Gist options
  • Save mattzeunert/8eb869345cd9f17933e8aac6358f5e0e to your computer and use it in GitHub Desktop.
Save mattzeunert/8eb869345cd9f17933e8aac6358f5e0e to your computer and use it in GitHub Desktop.

Prefix in context:

{
  "@context": {
    "sch": "http://schema.org/"
  },
  "@type": "Event",
  "sch:name": "sth"
}

Term definition:

{
  "@context": {
    "schema": "http://schema.org/",
    "name_en": {"@id": "schema:name", "@language": "en"},
    "name_fr": {"@id": "schema:name", "@language": "fr"}
  },
  "@type": "schema:Event",
  "name_en": "sth",
  "name_fr": "qqc"
}

Language map:

{
  "@context": {
    "schema": "http://schema.org/",
    "name": {"@id": "schema:name", "@container": "@language"}
  },
  "name":  {
    "en": "sth",
    "fr": "qqc"
  },
  "@type": "schema:Event"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment