I wonder if it would make sense to add a default method like this to YASON:ENCODE:
(defmethod yason:encode (o &optional s)
(yason:with-output (s)
(yason:encode-object o)))
This way, ENCODE will automatically work with any objects that define YASON:ENCODE-SLOTS.