as3corelib 中的JSON转换

as3corelib https://github.com/mikechambers/as3corelib

一个工具包 An ActionScript 3 Library that contains a number of classes and utilities for working with ActionScript? 3. These include classes for MD5 and SHA 1 hashing, Image encoders, and JSON serialization as well as general String, Number and Date APIs


其中解析JSON字符串的方式为

var jsonStr:String = "{\"topo\":{\"css\":\"main\", \"background_color\":\"#ccc\"}}";
var jsonObj : Object = JSON.decode(jsonStr);

注意json字符串的属性名和值 都必须使用双引号。



你可能感兴趣的:(json,String,serialization,include,library,actionscript)