从Flex中的资产访问JSON文件

从Flex中的资产访问JSON文件,json,actionscript-3,apache-flex,flex4.5,Json,Actionscript 3,Apache Flex,Flex4.5,如何解码Json文件。 我的代码 当我运行上述命令时,出现以下错误 Access of undefined property JSON. -JSON 使用下面的代码对我有效 代替这一准则 var arr:Object = com.adobe.serialization.json.JSON.decode(json); 用这个 var arr:Object = JSON.decode(json); 和导入以下软件包 import com.adobe.serialization.json.JSO

如何解码Json文件。 我的代码

当我运行上述命令时,出现以下错误

Access of undefined property JSON.
-JSON

使用下面的代码对我有效

代替这一准则

var arr:Object = com.adobe.serialization.json.JSON.decode(json);
用这个

var arr:Object = JSON.decode(json);
导入
以下软件包

import com.adobe.serialization.json.JSON;   
import com.adobe.serialization.json.JSON;