Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Decodes a JSON string into a XML object. #43

Open
darronschall opened this issue Jul 28, 2010 · 2 comments
Open

[Question] Decodes a JSON string into a XML object. #43

darronschall opened this issue Jul 28, 2010 · 2 comments

Comments

@darronschall
Copy link
Contributor

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

@darronschall
Copy link
Contributor Author

Updated by liangzhongmin on 2008-01-30T10:17:07

Thanks for help me!

@darronschall
Copy link
Contributor Author

Updated by mikechambers on 2008-07-02T16:46:57

Original ticket set status to NotABug (we converted to open)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant