JSON in Flex. "Access of undefined property JSON"
You need to download, install, and reference the utility library that contains the JSON routines. See http://labs.macromedia.com/wiki/index.php/ActionScript_3:resources:apis:libraries#corelib
Did you do that, and include it in your project?
Here is the new location for corelib: https://github.com/mikechambers/as3corelib (as of Feb. 2011 when I'm writing this)
Use the below code
var arr:Array = (com.adobe.serialization.json.JSON.decode(rawData) as Array);
instead of
var arr:Array = (JSON.decode(rawData) as Array);
Dont forget to import below packageimport com.adobe.serialization.json.JSON;
its working good for me!