Skip to content

Commit

Permalink
Add method to use the ENCODE-OBJECT/ENCODE-SLOTS protocol in ENCODE
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward authored and Edward committed Jan 13, 2022
1 parent e542b4c commit 8952e5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions encode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -446,3 +446,7 @@ LOWERCASE-KEYS? says whether the key should be in lowercase."
(:method (object)
(with-object ()
(yason:encode-slots object))))

(defmethod encode (object &stream stream)
(yason:with-output (s)
(yason:encode-object o)))

0 comments on commit 8952e5a

Please sign in to comment.