开发者

Decode a YAML serialized object

I have serialized an object in YAML and send it to a remote worker.

The worker doesent have the object def开发者_高级运维inition so i get a YAML::Object.

How can i access the field inside it?

A text field seems like that base64 encoded, how can i decode that? (no, decode64 not works).


you can pass the object as something "known between both sides" (like an openstruct or hash) or give the description to the client.

It would be interesting to have a serialization format that also serialized the class and its methods...I'll have to think about that one...


try c["bar"]

you can also see all the provided keys using c.keys

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜