Adding JSON-LD dataset example (thanks Gregg!)
authorYves Raimond <yves.raimond@bbc.co.uk>
Wed, 14 Aug 2013 17:40:30 +0100
changeset 1000 88fb508a2db3
parent 999 75658de5ed83
child 1001 a80a1f5124b3
Adding JSON-LD dataset example (thanks Gregg!)
rdf-primer/index.html
--- a/rdf-primer/index.html	Wed Aug 14 16:20:04 2013 +0100
+++ b/rdf-primer/index.html	Wed Aug 14 17:40:30 2013 +0100
@@ -580,6 +580,54 @@
       We could write our dataset example in JSON-LD as follows.</p>
 
       <pre>
+{
+  "@context": {
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "schema": "http://schema.org/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/"
+  },
+  "@graph": [
+    {
+      "@id": "http://example.org/bob",
+      "@graph": [
+        {
+          "@id": "http://example.org/bob#me",
+          "@type": "foaf:Person",
+          "foaf:knows": {
+            "@id": "http://example.org/alice#me"
+          },
+          "foaf:topic_interest": {
+            "@id": "http://www.wikidata.org/entity/Q12418"
+          },
+          "schema:birthDate": {
+            "@value": "1990-07-04",
+            "@type": "xsd:date"
+          }
+        }
+      ]
+    },
+    {
+      "@id": "https://www.wikidata.org/wiki/Special:EntityData/Q12418",
+      "@graph": [
+        {
+          "@id": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
+          "dc:subject": {
+            "@id": "http://www.wikidata.org/entity/Q12418"
+          }
+        },
+        {
+          "@id": "http://viaf.org/viaf/24604287/",
+          "@type": "foaf:Person",
+          "foaf:made": {
+            "@id": "http://www.wikidata.org/entity/Q12418"
+          },
+          "foaf:name": "Leonardo da Vinci"
+        }
+      ]
+    }
+  ]
+}
       </pre>
 
     </section>