Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Default method for YASON:ENCODE #66

Open
fiddlerwoaroof opened this issue Jan 13, 2022 · 0 comments
Open

Default method for YASON:ENCODE #66

fiddlerwoaroof opened this issue Jan 13, 2022 · 0 comments

Comments

@fiddlerwoaroof
Copy link

fiddlerwoaroof commented Jan 13, 2022

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant