[plt-scheme] serializing /all/ of struct

From: George Herson (gherson at snet.net)
Date: Mon Feb 12 10:22:09 EST 2007

How to serialize a structure to a file?

Read/tested using the info in
but so far can only deserialize a serialized structure
with its original field names if the program that
created the structure is still running.  A structure
inspector of (make-inspector) or #f isn't sufficient
to get my structure's field names written to file.

Let's say I have the following command and I want to
make dept persistent by writing /all/ its info to
file.  How do I change and add to it so that Scheme
will recognize later when this data is read and

(define-serialize-struct dept (deptid dname)

On a related subject, why was is advantageous to
create specially serializable objects rather than
enable (serialize any-object)?


Posted on the users mailing list.