Example in JSON-LD
authorYves Raimond <yves.raimond@bbc.co.uk>
Mon, 15 Apr 2013 17:10:18 +0100
changeset 806 b3a49f528625
parent 805 9a93c0ffa86b
child 807 9a33745e2db9
child 809 31090a480c40
Example in JSON-LD
rdf-primer/index.html
--- a/rdf-primer/index.html	Mon Apr 15 16:22:46 2013 +0100
+++ b/rdf-primer/index.html	Mon Apr 15 17:10:18 2013 +0100
@@ -345,6 +345,42 @@
   :on-display-in :the-louvre .
     </pre>
 
+    <h3>JSON-LD</h3>
+
+    <p><a href="http://www.w3.org/TR/json-ld-syntax/">JSON-LD</a> provides a lightweight JSON syntax for RDF graphs and datasets.
+    JSON-LD can be used to transform JSON documents to RDF with minimal changes, therefore bringing the benefits of RDF to the JSON
+    world. Those benefits include universal identifiers for JSON objects, a mechanism in which a JSON document can refer to
+    an object described in another JSON document elsewhere on the Web, as well as datatype and language handling.
+    </p>
+
+    <pre>
+{
+  "@context": {
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "schema": "http://schema.org/",
+    "@vocab": "http://example.org/#",
+    "@base": "http://example.org/#"
+  },
+  "@id": "bob",
+  "@type": "foaf:Person",
+  "schema:birthDate": { 
+    "@value": "1990-07-04", 
+    "@type": "xsd:date"
+  },
+  "foaf:knows": {
+    "@id": "alice",
+    "@type": "foaf:Person"
+  },
+  "likes": {
+    "@id": "the-mona-lisa",
+    "on-display-in": {
+      "@id": "the-louvre"
+    }
+  }
+}
+    </pre>
+
 </section>
 
 <section id="section-vocabulary">