3 Replies Latest reply on May 21, 2008 5:38 AM by

    JSON or JS-Object in EncryptedLocalStore

      I am wondering if anybody experienced problems reading stored JSON-Strings from local store. In my application there is an object containing an array. When evaluating the JSON-String (i am using Ext-Framework to do this) the object is evaluated successfully but the array is not. When copy&paste the string, read from local store and then evaluating using the same function, it works. Doing the same with eval() results in the same problem, the array is gone.

      Any ideas?

      Best regards.

      Rob
        • 1. Re: JSON in EncryptedLocalStore
          Tested the same with writeObject() and readObject() of the ByteArray class. Doing this i do not transform my object to JSON, instead I stored the object itself. --> Same problem, the inner array disappears!
          • 2. Re: JSON or JS-Object in EncryptedLocalStore
            Strange! I changed the property name of the array from "Actions" to another name. Now it works.
            • 3. Re: JSON or JS-Object in EncryptedLocalStore
              Still problems here, seems that there is a general bug in here. Sometimes the property containing the array is there, and then later (in the same session) it is gone.

              Example:

              After initialisation this property is available which means, I can access it via air.trace or alert. (Strange thing here, the introspector only shows the array length):

              this.Hosts[0].Requests[0].Sysname;


              After some clicks the same call. This time, an error occurs. "Undefined value":

              air.trace(this.Hosts[0].Requests[0].Sysname);


              (The object using this is a singleton so the data should be consistent.)