title: Can I Rely on the Order of a JSON Array?
body: <p>It's obvious that I can't rely on the ordering of key-value pairs in JSON. For example, a JSON parser could interpret</p>
  
  <pre><code>{
      "someKey" : "someValue",
      "anotherKey" : "anotherValue",
      "evenAnotherKey" : "evenAnotherValue"
  }
  </code></pre>
  
  <p>as</p>
  
  <pre><code>{
      "anotherKey" : "anotherValue",
      "someKey" : "someValue",
      "evenAnotherKey" : "evenAnotherValue"
  }
  </code></pre>
  
  <p>legally, but could I rely on the ordering of a JSON <em>array</em>? For example, could a JSON parser interpret</p>
  
  <pre><code>{
      "arrayKey" : ["firstElement", "secondElement", "thirdElement"]
  }
  </code></pre>
  
  <p>as</p>
  
  <pre><code>{
      "arrayKey" : ["secondElement", "firstElement1", "thirdElement"]
  }
  </code></pre>
  
  <p>legally? I'd assume not, but my friend told me that I was incorrect.</p>