(defun alist-to-hash-table (alist &key (test 'eql) &aux (hash-table (make-hash-table :test test))) (loop :for (key . value) :in alist :do (setf (gethash key hash-table) value)) hash-table) (defun hash-table-to-alist (hash-table) (let ((result '())) (maphash (lambda (key val) (push (cons key val) result)) hash-table) result)) (def-serialize-method ((object hash-table) transaction-log) (id log-stream) (serialize `(alist-to-hash-table ,(hash-table-to-alist object) :test ,(hash-table-test object)) transaction-log))