You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally filed by liangzhongmin on 2008-01-30T10:16:22
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
The text was updated successfully, but these errors were encountered:
Originally filed by liangzhongmin on 2008-01-30T10:16:22
My System:
Flex Builder 2.0.1
as3corelib version: Release version .90
Code: Decodes a JSON string into a Array object.
package
{
('[{"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
{
('[{"title":"MTEnclosures","url":"http:www.ev123.com"}]');
var xm:XML=(object as XML);
trace("xm="+xm);
}
}
}
Result: xm=null
The text was updated successfully, but these errors were encountered: