Indicate that language map values MUST be a string or array of strings.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Mon, 10 Dec 2012 18:26:30 -0800
changeset 1020 5556fb193f4a
parent 1019 f6d6980c714d
child 1021 11d6994993b2
Indicate that language map values MUST be a string or array of strings.
Update processing rules to be for each value of the key/value pair, if it is an array.
Indicate that the language map key MUST be valid BCP47.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Mon Dec 10 18:15:05 2012 -0800
+++ b/spec/latest/json-ld-api/index.html	Mon Dec 10 18:26:30 2012 -0800
@@ -1102,15 +1102,16 @@
           process the associated <em>value</em> as a <em>language map</em>:
             <ol class="algorithm">
               <li>Set <em>multilingual array</em> to an empty array.</li>
-              <li>For each key-value in the <em>language map</em>:
+              <li>For each key-value in the <em>language map</em> and for each value, if value is an <tref>array</tref>:
                 <ol class="algorithm">
                   <li>Create a new <tref>JSON Object</tref>, referred to as an <em>expanded language object</em>.
                   <li>Add a key-value pair to the <em>expanded language object</em> where the
                     key is <code>@value</code> and the value is
-                    the value associated with the key in the <em>language map</em>.</li>
+                    the value associated with the key in the <em>language map</em>, which MUST be a
+                    <tref>string</tref> or <tref>array</tref> of <tref title="string">strings</tref>.</li>
                   <li>Add a key-value pair to the <em>expanded language object</em> where the
                     key is <code>@language</code>, and the value is the key in the
-                    <em>language map</em>, transformed to lowercase.
+                    <em>language map</em>, transformed to lowercase, which MUST be valid according to [[!BCP47]].
                   </li>
                   <li>Append the <em>expanded language object</em> to the <em>multilingual array</em>.
                 </ol>