0 Replies Latest reply on Jun 11, 2008 8:17 AM by bitwyse

    Flex and JSON

    bitwyse Level 1
      Hi All,

      I am trying to integrate JSON with my flex application as it seems to be much faster than using xml via web services . . .

      Below is some sample output being returned and I'm unsure how to access the data in nested arrays. I'm hoping someone can help me with some insight into breaking up the pieces.

      Almost forgot, I'm using the corelib JSON routines to get the data created by darron schall . . .

      I am trying to access the data in the different columns within the entrydata element. . . .

      Thanks for any help you can offfer. . . .

      Here is what it looks like in the debugger with the raw text below . . . .

      arr = Array (@709e7b1)
      [0...99]
      [0] = Object (@7075a11)
      @noteid = "4662"

      @position = "1"
      @siblings = "114"
      @unid = "AB7A73759B12E59D8625711B007D05D0"
      entrydata = Array (@709efc9)

      [0] = Object (@7075a39)
      @columnnumber = "0"
      @name = "$18"
      number = Object (@7075a89)

      [1] = Object (@7075ab1)
      @columnnumber = "1"
      @name = "$17"
      text = Object (@7075b01)

      [2] = Object (@7075b29)
      @columnnumber = "2"
      @name = "$12"
      text = Object (@7075b79)

      [3] = Object (@7075ba1)
      [4] = Object (@7075c19)
      [5] = Object (@7075c91)
      length = 6



      {
      "@timestamp": "20080611T145442,97Z",
      "@toplevelentries": "115",
      "viewentry": [
      {
      "@position": "1",
      "@unid": "AB7A73759B12E59D8625711B007D05D0",
      "@noteid": "4662",
      "@siblings": "115",
      "entrydata": [
      {
      "@columnnumber": "0",
      "@name": "$18",
      "number": {
      "0": "70"
      }
      },
      {
      "@columnnumber": "1",
      "@name": "$17",
      "text": {
      "0": "8190 , Agent"
      }
      },
      {
      "@columnnumber": "2",
      "@name": "$12",
      "text": {
      "0": ""
      }
      },
      {
      "@columnnumber": "3",
      "@name": "CompanyName",
      "text": {
      "0": ""
      }
      },
      {
      "@columnnumber": "4",
      "@name": "$16",
      "text": {
      "0": "Agent 8190/PSCDM@PSCDM"
      }
      },
      {
      "@columnnumber": "5",
      "@name": "$21",
      "text": {
      "0": "notil4/pscdm"
      }
      }
      ]
      },
      {
      "@position": "2",
      "@unid": "0F8346B29E38AF048625711B007D24FC",
      "@noteid": "46A6",
      "@siblings": "115",
      "entrydata": [
      {
      "@columnnumber": "0",
      "@name": "$18",
      "number": {
      "0": "70"
      }
      },
      {
      "@columnnumber": "1",
      "@name": "$17",
      "text": {
      "0": "8191 , Agent"
      }
      },
      {
      "@columnnumber": "2",
      "@name": "$12",
      "text": {
      "0": "(office) 40191"
      }
      },
      {
      "@columnnumber": "3",
      "@name": "CompanyName",
      "text": {
      "0": ""
      }
      },
      {
      "@columnnumber": "4",
      "@name": "$16",
      "text": {
      "0": "jeri.smith@contract.hro.com@PSCDM"
      }
      },
      {
      "@columnnumber": "5",
      "@name": "$21",
      "text": {
      "0": "notil4/pscdm"
      }
      }
      ]
      }
      {
      "@columnnumber": "1",
      "@name": "$17",
      "text": {
      "0": "Zapper , Zulu"
      }
      },
      {
      "@columnnumber": "2",
      "@name": "$12",
      "text": {
      "0": ""
      }
      },
      {
      "@columnnumber": "3",
      "@name": "CompanyName",
      "text": {
      "0": ""
      }
      },
      {
      "@columnnumber": "4",
      "@name": "$16",
      "text": {
      "0": "Zulu Zapper/PSCDM@PSCDM"
      }
      },
      {
      "@columnnumber": "5",
      "@name": "$21",
      "text": {
      "0": "pscextil01/PSCEXT"
      }
      }
      ]
      ]
      }