Skip to content

JSON LD Questions

Thad Guidry edited this page Jul 24, 2018 · 1 revision

Can the schema.org JSON-LD context be used and overwritten ?

Yes, use a JSON-LD document such as the following:

{
  "@context": ["http://schema.org", {
    "url": {"@type": "@id"}
  }],
  url: "http://some-location/"
}

This will ensure that the url property is treated like an IRI, not a literal. This may be the default in the schema.org context, but it definitely isn't for other properties you probably want to have interpreted as IRIs. You can also put these in an external document, and either access as

"@context": ["http://schema.org", "http://myschemaupdates"]

or simply make myschemaupdates also include http://schema.org.

(from Greg Kellogg issue comment)

Clone this wiki locally