<doc>
  <legacy_id>3518</legacy_id>
  <name>arrayDecode</name>
  <type>function</type>
  <syntax>
    <example>arrayDecode(<i>encodedArray</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Writing LiveCode</category>
  </classification>
  <references>
    <function tag="arrayEncode">arrayEncode Function</function>
    <function tag="URLDecode">URLDecode Function</function>
  </references>
  <history>
    <introduced version="3.5">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Converts a serialized array back into the original array.</summary>
  <examples>
    <example>put arrayDecode(loadPreferencesData("displayOptions")) into sDisplayOptionsArray</example>
    <example>read from socket tClient until linefeed</p><p>put urlDecode(arrayDecode(it)) into tClientDataArray</example>
  </examples>
  <description>
    <p>Use the <b>arrayDecode</b> function to rebuild an array from an encoded string produced by the <function tag="arrayEncode">arrayEncode function</function>. </p><p/><p><b>Parameters:</b></p><p>The <i>encodedArray</i> is a binary string representing an array, as returned by the <function tag="arrayEncode">arrayEncode function</function>.</p><p/><p><b>Comments:</b></p><p>Encoding and decoding arrays is designed to allow arrays to be written to a file on disk, or sent across a network. See the <function tag="arrayEncode">arrayEncode</function> reference for more information on doing this.</p><p/><p><b>Note:</b> It is possible for two different strings to produce the same array. This is due to arrays having a different ordering of <function tag="keys">keys</function>. To see if two encoded arrays are equal, first decode them back into the original array, then directly compare them using the <operator tag="=">= operator.</operator></p>
  </description>
</doc>