mengu on web programming.

Serialization With Ruby

I have needed this for my application and in case someone needs serialization with Ruby, here is how to do it. All you need is the class named Marshal.

In order to serialize an object:

serializedData = Marshal.dump(object)

In order to unserialize an object:

Marshal.load(serializedData)

That's all.

Comments

No comments made for this post.

Leave a Response

No HTML allowed. You can use markdown.
Name*:
E-Mail* (not published):
Web site:
Response: