Sort keys of language maps case-sensitively before expanding
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Tue, 11 Dec 2012 13:34:09 +0100
changeset 1024 914dad60667d
parent 1023 0b28a26bf5c8
child 1025 ae990230344a
Sort keys of language maps case-sensitively before expanding

This leads to much better performance as the keys don't have to be lower-cased multiple times.

This addresses #133.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Tue Dec 11 13:30:29 2012 +0100
+++ b/spec/latest/json-ld-api/index.html	Tue Dec 11 13:34:09 2012 +0100
@@ -1102,7 +1102,7 @@
           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> ordered by key case insensitively, and for each value, if value is an <tref>array</tref>:
+              <li>For each key-value pair in the <em>language map</em> ordered case-sensitively by key, 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