[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Serializing Lisp Objects
|
From: |
Pascal J. Bourguignon |
|
Subject: |
Re: Serializing Lisp Objects |
|
Date: |
Tue, 09 Jun 2009 11:25:09 +0200 |
|
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux) |
Nordlöw <address@hidden> writes:
> How do I serialize (encode) and unserialize (decode) an arbitrary
> elisp object (code or data) to and from disk/network etc?
(defun encode-to-string (object) (prin1-to-string object))
(defun decode-from-string (string) (read-from-string string))
Now, of course, this works only for objects that are printable
readably.
> Can I use other format than the symbolic one?
Yes, but you will have to implement the serializer yourself.
--
__Pascal Bourguignon__