Fixed Person example to use new JSON-LD spec language.
authorManu Sporny <msporny@digitalbazaar.com>
Mon, 16 Jan 2012 15:53:05 -0500
changeset 341 1a8ed98f93a2
parent 340 1d685d4da5a6
child 342 3688fe5c754c
Fixed Person example to use new JSON-LD spec language.
contexts/person
--- a/contexts/person	Mon Jan 16 12:56:34 2012 -0500
+++ b/contexts/person	Mon Jan 16 15:53:05 2012 -0500
@@ -2,50 +2,76 @@
    "@context":
    {
       "Person": "http://xmlns.com/foaf/0.1/Person",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
       "name": "http://xmlns.com/foaf/0.1/name",
       "nickname": "http://xmlns.com/foaf/0.1/nick",
       "affiliation": "http://schema.org/affiliation",
       "depiction": "http://xmlns.com/foaf/0.1/depiction",
-      "born": "http://schema.org/birthDate",
-      "child": "http://schema.org/children",
-      "colleague": "http://schema.org/colleagues",
-      "knows": "http://xmlns.com/foaf/0.1/knows",
-      "died": "http://schema.org/deathDate",
-      "email": "http://xmlns.com/foaf/0.1/mbox",
+      "born": 
+      {
+         "@id": "http://schema.org/birthDate",
+         "@type": "xsd:dateTime"
+      },
+      "child": 
+      {
+         "@id": "http://schema.org/children",
+         "@type": "@id"
+      },
+      "colleague": 
+      {
+         "@id": "http://schema.org/colleagues",
+         "@type": "@id"
+      },
+      "knows": 
+      {
+         "@id": "http://xmlns.com/foaf/0.1/knows",
+         "@type": "@id"
+      },
+      "died": 
+      {
+         "@id": "http://schema.org/deathDate",
+         "@type": "xsd:dateTime"
+      },
+      "email": 
+      {
+         "@id": "http://xmlns.com/foaf/0.1/mbox",
+         "@type": "@id"
+      },
       "familyName": "http://xmlns.com/foaf/0.1/familyName",
       "givenName": "http://xmlns.com/foaf/0.1/givenName",
       "gender": "http://schema.org/gender",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "homepage": 
+      {
+         "@id": "http://xmlns.com/foaf/0.1/homepage",
+         "@type": "@id"
+      },
       "honorificPrefix": "http://schema.org/honorificPrefix",
       "honorificSuffix": "http://schema.org/honorificSuffix",
       "jobTitle": "http://xmlns.com/foaf/0.1/title",
       "nationality": "http://schema.org/nationality",
-      "parent": "http://schema.org/parent",
-      "sibling": "http://schema.org/sibling",
-      "spouse": "http://schema.org/spouse",
-      "telephone": "http://schema.org/telephone",
-      
+      "parent": 
+      {
+         "@id": "http://schema.org/parent",
+         "@type": "@id"
+      },
+      "sibling": 
+      {
+         "@id": "http://schema.org/sibling",
+         "@type": "@id"
+      },
+      "spouse": 
+      {
+         "@id": "http://schema.org/spouse",
+         "@type": "@id"
+      },
+      "telephone": "http://schema.org/telephone",      
       "Address": "http://www.w3.org/2006/vcard/ns#Address",
       "address": "http://www.w3.org/2006/vcard/ns#address",
       "street": "http://www.w3.org/2006/vcard/ns#street-address",
       "locality": "http://www.w3.org/2006/vcard/ns#locality",
       "region": "http://www.w3.org/2006/vcard/ns#region",
       "country": "http://www.w3.org/2006/vcard/ns#country",
-      "postalCode": "http://www.w3.org/2006/vcard/ns#postal-code",
-
-      "@coerce":
-      {
-         "born": "xsd:dateTime",
-         "knows": "@iri",
-         "died": "xsd:dateTime",
-         "email": "@iri",
-         "homepage": "@iri",
-         "parent": "@iri",
-         "child": "@iri",
-         "colleague": "@iri",
-         "sibling": "@iri",
-         "spouse": "@iri"
-      }
+      "postalCode": "http://www.w3.org/2006/vcard/ns#postal-code"
    }
 }