在 ActionScript 3 中反序列化
我有一个在 PHP 中构建的数组,我正在序列化该数组,然后通过 AMFPHP 返回到 Flex。有人可以向我指出一种解决方案,用于在数据通过 ActionScript 3 进入 Flex 后对其进行反序列化吗?
I have an array that I am constructing in PHP which I am serializing then returning to Flex through AMFPHP. Can someone point me towards a solution for unserilizing said data once it gets into Flex via ActionScript 3?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上有两种方法。如果您使用类似
RemoteObject
类的内容,它们将自动反序列化。这就是我更喜欢做事的方式。但是,如果您拥有的只是一个ByteArray
如果序列化对象,则可以使用read{Object,Int,...}
方法来读取它包含的数据。There are basically two ways. If you use something like the
RemoteObject
class, they will be automatically deserialized. This is how I prefer to do things. However, if all you've got is aByteArray
if serialized objects, you can use theread{Object,Int,...}
methods to read the data it contains.