Update spec to discourage empty terms/prefixes ("")
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sat, 05 May 2012 17:00:54 +0800
changeset 625 f565ffab7ef1
parent 624 5c01de0d06b1
child 626 89f163eb2dc7
Update spec to discourage empty terms/prefixes ("")
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-syntax/index.html	Fri May 04 16:30:18 2012 -0400
+++ b/spec/latest/json-ld-syntax/index.html	Sat May 05 17:00:54 2012 +0800
@@ -371,12 +371,12 @@
     </dd>
     <dt><tdef>array</tdef></dt>
     <dd>
-      In JSON, an array is an <em>ordered</em> collection of values. An array 
+      In JSON, an array is an <em>ordered</em> collection of values. An array
       is represented as square brackets surrounding zero or more values that
       are separated by commas.  While JSON-LD uses the same array representation
-      as JSON, the collection is <em>unordered</em> by default. While order is 
-      preserved in regular JSON arrays, it is not in regular JSON-LD arrays 
-      unless specific markup is provided (see <a href="#sets-and-lists">Sets and Lists</a>). 
+      as JSON, the collection is <em>unordered</em> by default. While order is
+      preserved in regular JSON arrays, it is not in regular JSON-LD arrays
+      unless specific markup is provided (see <a href="#sets-and-lists">Sets and Lists</a>).
     </dd>
     <dt><tdef>string</tdef></dt><dd>
       A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A
@@ -579,7 +579,9 @@
   <tref>IRI</tref>. <tref>Term</tref>s MAY be defined as any valid JSON <tref>string</tref> other
   than a JSON-LD <tref>keyword</tref>. To avoid
   forward-compatibility issues, <tref>term</tref>s starting with an <code>@</code> character SHOULD NOT be used
-  as they might be used as <tref title="keyword">keywords</tref> in future versions of JSON-LD.</p>
+  as they might be used as <tref title="keyword">keywords</tref> in future versions of JSON-LD. Furthermore,
+  the use of empty terms (<code>""</code>) is discouraged as not all programming languages are able to handle
+  empty property names properly.</p>
 <p>The Web uses <tref title="IRI">IRIs</tref> for unambiguous identification. The
   idea is that these <tref>term</tref>s mean something that may be of use to other developers and that it is useful to
   give them an unambiguous identifier. That is, it is useful for <tref>term</tref>s to expand to IRIs so that
@@ -2432,20 +2434,19 @@
 
 <div class="note">
 <p>JSON-LD has no equivalent for the Turtle <code>@base</code> declaration. Authors could, of course,
-  use a prefix definition to resolve <tref>relative IRI</tref>s. For example, an empty prefix could be used
-  to get a similar effect to <code>@base</code>:</p>
+  use a prefix definition to resolve <tref>relative IRI</tref>s:</p>
 <pre class="example" data-transform="updateExample">
 <!--
 {
   "@context":
   {
-    ****"": "http://manu.sporny.org/",****
+    ****"base": "http://manu.sporny.org/",****
     "foaf": "http://xmlns.com/foaf/0.1/"
   },
-  "@id": ****":i/public"****,
+  "@id": ****"base:i/public"****,
   "@type": "foaf:Person",
   "foaf:name": "Manu Sporny",
-  "foaf:homepage": { "@id": ****":" ****}
+  "foaf:homepage": { "@id": ****"base" ****}
 }
 -->
 </pre>