title: How to decode Json using native JSON or actionjson in Flex 3
body: <p>I have the below Json (wf.json)</p>
  
  <pre><code>{
  "workflow":{
      "template":"Analysis1",
  
      "start":{
          "instance":"HDA_run1",
          "user":"symtest",
          "date":"3-Mar-2012",
          "timestamp":"1330948220475"
      },
      "host":{
          "name":"bartla",
          "user":"symtest1",
          "password":"symtest1",
          "installpath":"",
          "product":""
      },
      "javadump":{
          "pid":"8989",
          "corefilename":"",
          "heapdump":"",
          "stack":"",
          "JAVA_HOME":""  
      },
      "mat":{
      },
      "email":{
          "to":"ars@gmail.com",
          "subject":"",
          "message":""
      },
      "end":{
      }
  }
  }
  </code></pre>
  
  <p>As you can see there are 7 items (or sub headings inside main heading <code>workflow</code>). Under each item it can have another set of properties eg: email <code>(item)</code> has 3 properties <code>("name":"value")</code>.</p>
  
  <p>So based on the number of properties I need to be able to create controls <code>(Text)</code> in my Flex 3 UI. </p>
  
  <p>I read <a href="http://workflowflash.com/45947/actionjson-%E2%80%93-the-fastest-actionscript-3-0-json-parser.php" rel="nofollow noreferrer">here</a> that <a href="https://github.com/mherkender/actionjson#readme" rel="nofollow noreferrer">actionjson</a> is 5-6x faster than the <a href="http://github.com/mikechambers/as3corelib" rel="nofollow noreferrer">as3corelib</a>, but I am not able to find any example code for it. The actionjson doc says it function the same way as corelib, so I even tried <code>import com.adobe.serialization.json.JSON; JSON.decode(rawData)</code> but it is unable to find <code>JSON</code>.</p>
  
  <p>Below is my code</p>
  
  <pre><code>&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
              layout="absolute" minWidth="955" minHeight="600"
              creationComplete="service.send()"&gt;
  
      &lt;mx:Script&gt;
      &lt;![CDATA[
  
          import mx.controls.Alert;
          import mx.rpc.events.ResultEvent;
  
          private function onJSONLoad(event:ResultEvent):void
          {
              //get the raw JSON data and cast to String
              var rawData:String = String(event.result);
              //Alert.show(rawData); This prints my JSON String
  
              var obj:Object = decodeJson(rawData);   
              /*error call to possibly undefined method decodeJson*/
              Alert.show(obj.toString());
          }
      ]]&gt;
      &lt;/mx:Script&gt;
  
      &lt;mx:HTTPService id="service" resultFormat="text"
                  url="/cjb/wf.json"
                  result="onJSONLoad(event)" /&gt;
  
  &lt;/mx:Application&gt;
  </code></pre>
  
  <p>Please help me fetch <code>name, values</code> if any from each item. Thanks</p>
  
  <p>Is it not possible to directly fetch json data from an object (not custom made) like it is done in <a href="http://api.jquery.com/jQuery.parseJSON/" rel="nofollow noreferrer">jquery</a>?</p>
  
  <p><strong>Update with Flex Build Path</strong></p>
  
  <p><img src="https://i.stack.imgur.com/pW1Jv.png" alt="enter image description here"></p>