I'm experimenting with cl-marshal, and I've been able to serialize and deserialize instances of classes I've made myself.
(defclass thread ()
((id
:initarg :id
:accessor id)
(user
:initarg :user
:accessor user
:initform nil
:documentation "creator of thread")
(title
:initarg :title
:accessor title
:documentation "title of thread")
(replies
:initarg :replies
:accessor replies
:documentation "number of replies"))
(:documentation "forum thread"))
(defmethod ms:class-persistent-slots ((self thread))
'(id user title replies))
This lets me ms:marshal and ms:demarshal instances of thread. However, some of my structs have instances of quri:uri-https in them, and I have not been able to get marshall to serialize them. The following does not work for me.
(defmethod ms:class-persistent-slots ((self quri:uri-https))
(format t "hello")
'(scheme userinfo host port path query fragment))
Any ideas?
https://github.com/wlbr/cl-marshal
https://github.com/fukamachi/quri