From 8f3616a59f433d8f459b18acb8b68d19ecb60c38 Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 12 Jan 2022 19:08:28 -0800 Subject: [PATCH] Add method to use the ENCODE-OBJECT/ENCODE-SLOTS protocol in ENCODE --- encode.lisp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/encode.lisp b/encode.lisp index 92f6684..c5e55e8 100644 --- a/encode.lisp +++ b/encode.lisp @@ -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 &optional stream) + (yason:with-output (stream) + (yason:encode-object object)))