From: Michael Hohn Date: 1999-07-14T14:12:03-06:00 Subject: [ruby-talk:00496] serialization of objects? Hello, I've noticed the Object.to_s method to get a string from an Object. Is there a simple way to restore an entire object hierarchy from a string? For example, given a (non-cyclic) graph structure f, (1) would the writer block file = open("f.out", "w") print file, "%s", f.to_s close(file) get f and all its data, or just f? (2) How would one implement a reader so the following works: file = open("f.out", "r") f.from_string_stream file close(file) Thanks for your help and patience :) Chiao, Michael