After executing the solution from RIAstar, this is what I did (both the Flex 3.5 compiler and the 4.6 compiler code)
Flex 3.5 compiler using as3corelib.swc for JSON
import com.adobe.serialization.json.JSON; private var temp:String ='{"workflow":{ "template":"HeapDumpAnalysis", "start":{ "instance":"HDA_run1", "user":"symtest", "date":"3-Mar-2012", "timestamp":"1330948220475" }, "host":{ "name":"estilo", "user":"symtest1", "password":"symtest1", "installpath":"", "product":"" }, "javadump":{ "pid":"8989", "corefilename":"", "heapdump":"", "stack":"", "INFA_HOME":"" }, "mat":{ }, "email":{ "to":" vsatwik@informatica.com ", "subject":"", "message":"" }, "end":{ }}}'; private function test():void { var obj = JSON.decode(temp); var workflow:Object = obj.workflow; for (var key:String in workflow) { trace(key + ': ' + workflow[key] + (key is String) + ", " + (workflow[key] is String)); } }
Exit
javadump: [object Object]true, false template: HeapDumpAnalysistrue, true host: [object Object]true, false end: [object Object]true, false mat: [object Object]true, false email: [object Object]true, false start: [object Object]true, false
Flex 4.6 compiler using native Json analysis
private var temp:String ='{"workflow":{ "template":"HeapDumpAnalysis", "start":{ "instance":"HDA_run1", "user":"symtest", "date":"3-Mar-2012", "timestamp":"1330948220475" }, "host":{ "name":"estilo", "user":"symtest1", "password":"symtest1", "installpath":"", "product":"" }, "javadump":{ "pid":"8989", "corefilename":"", "heapdump":"", "stack":"", "INFA_HOME":"" }, "mat":{ }, "email":{ "to":" ars@gmail.com ", "subject":"", "message":"" }, "end":{ }}}'; private function test():void { var result:Object = JSON.parse(temp); var workflow:Object = result.workflow; for (var key:String in workflow) { trace(key + ': ' + workflow[key] + (key is String) + ", " + (workflow[key] is String)); } }
Exit
javadump: [object Object]true, false mat: [object Object]true, false end: [object Object]true, false email: [object Object]true, false host: [object Object]true, false start: [object Object]true, false template: HeapDumpAnalysistrue, true