Disallow empty strings as term
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 13 Mar 2013 18:04:01 +0100
changeset 1434 e2b3b3f5a8b2
parent 1433 c6b5263ce7f7
child 1435 a73a78cc1fba
Disallow empty strings as term

I took the liberty to change the "are discouraged" to a MUST NOT. This is the only way to ensure interoperability IMHO. I'm still on the fence about adding a MUST NOT to disallow multiple members using the same key. JSON itself has a SHOULD NOT (but that might be changed soon).

/cc @msporny @dlongley @gkellogg @niklasl
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-syntax/index.html	Wed Mar 13 17:36:02 2013 +0100
+++ b/spec/latest/json-ld-syntax/index.html	Wed Mar 13 18:04:01 2013 +0100
@@ -1403,7 +1403,7 @@
     of JSON-LD. Terms starting with an&nbsp;<code>@</code> character that are not
     <tref title="keyword">JSON-LD 1.0 keywords</tref> are treated as any other term, i.e.,
     they are ignored unless mapped to an <tref>IRI</tref>. Furthermore, the use of
-    empty <tref title="term">terms</tref> (<code>""</code>) is discouraged, as
+    empty <tref title="term">terms</tref> (<code>""</code>) is not allowed as
     not all programming languages are able to handle empty property names.</p>
 </section>
 
@@ -2758,8 +2758,8 @@
 
   <p>To avoid forward-compatibility issues, a <tref>term</tref> SHOULD NOT start
     with an <code>@</code> character as future versions of JSON-LD may introduce
-    additional <tref title="keyword">keywords</tref>. Furthermore, the use of
-    empty terms (<code>""</code>) is discouraged as not all programming languages
+    additional <tref title="keyword">keywords</tref>. Furthermore, the term MUST NOT
+    be an empty <tref>string</tref> (<code>""</code>) as not all programming languages
     are able to handle empty property names.</p>
 
   <p>See <a href="#the-context"></a> and <a href="#iris"></a> for further discussion