My System:
Flex Builder 2.0.1
as3corelib version: Release version .90
Code: Decodes a JSON string into a Array object.
package
{
import flash.display.Sprite;
import com.adobe.serialization.json.JSON;
import flash.xml.XMLDocument;
public class JSonTest extends Sprite
{
public function JSonTest(){
var object:Object=JSON.decode
('[{"title":"MTEnclosures","url":"http:www.ev123.com"}]');
var xm:Array=(object as Array);
trace("xm="+xm[0].title);
}
}
}
Code: Decodes a JSON string into a XML object.
package
{
import flash.display.Sprite;
import com.adobe.serialization.json.JSON;
import flash.xml.XMLDocument;
public class JSonTest extends Sprite
{
public function JSonTest(){
var object:Object=JSON.decode
('[{"title":"MTEnclosures","url":"http:www.ev123.com"}]');
var xm:XML=(object as XML);
trace("xm="+xm);
}
}
}
Result: xm=null
Original issue reported on code.google.com by liangzho...@gmail.com on 30 Jan 2008 at 10:16
Original issue reported on code.google.com by
liangzho...@gmail.com
on 30 Jan 2008 at 10:16