-
-
Save ivikash/6041987 to your computer and use it in GitHub Desktop.
{ | |
"@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" | |
} | |
} | |
} |
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").
All the prefixes that you use need to be defined somewhere. In this case, the declaration for
xsd
is missing.