Last active
December 20, 2015 00:29
-
-
Save ivikash/6041987 to your computer and use it in GitHub Desktop.
Person.jsonld -> Context for Person using schema.org as Vocab and XSD types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context" : { | |
"@vocab": "http://schema.org/", | |
"xsd": "http://www.w3.org/2001/XMLSchema#", | |
"image" : { | |
"@type" : "@id" | |
}, | |
"about": { | |
"@type": "@id" | |
}, | |
"address": { | |
"@type": "@id" | |
}, | |
"alumni": { | |
"@type": "@id" | |
}, | |
"alumniOf": { | |
"@type": "@id" | |
}, | |
"birthDate": { | |
"@type": "xsd:date" | |
}, | |
"nationality": { | |
"@type": "@id" | |
}, | |
"spouse": { | |
"@type": "@id" | |
}, | |
"workLocation": { | |
"@type": "@id" | |
}, | |
"worksFor": { | |
"@type": "@id" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would expect that any property with a range that uses a complex type should be coerced to an @id. For instance, looking at the Person description, I see that
address
is a PostalAddress,affiliation
is an Organization,spouse
is a Person,parent
is a Person, etc. Things of these types would all be identified by a URL (an @id). You would want to be able to get the values of these properties and "follow" them (and you can because they are URLs) to get more information about them. This is a major part of Linked Data.So the general rule is probably: if the type for a property value on the schema.org page is a link to a complex type, you should be indicating in the @context that the expected value for the property is an @id (by using "@type": "@id").