riogezz
riogezz

Reputation: 15

Flash Builder 4.6/Flex String unserialize

I got a string like

a:1:{i:0;a:2:{s:4:"name";s:19:"http://www.test.com";s:5:"value";d:2.20;}}

and I need to unserialize it to an Array using AS3 or Flash Builder 4.6/Flex

How could i do the job?

I cannot unserialize and convert to XML using PHP.

In few words I need to do the same as PHP unserialize but with Flash Builder.

Thanks in advance

Upvotes: 0

Views: 312

Answers (1)

Mihai Iorga
Mihai Iorga

Reputation: 39704

There is an OpenSource for this SerializerClass

var string = 'a:1:{i:0;a:2:{s:4:"name";s:19:"http://www.test.com";s:5:"value";d:2.20;}}';
import org.sepy.io.Serializer;
var myData = Serializer.unserialize( string ); 
trace(myData[0]['name']);

Upvotes: 1

Related Questions