Compare commits

...

2 Enmetoj

Author SHA1 Message Date
Jaidyn Ann fdbda3672f Fix JSON serialization issue with double-commas
… I forgot to add an output to YASON:ENCODE!
2024-06-22 13:33:05 -05:00
Jaidyn Ann 8e58c7b1a4 Remove unused function, ALIST-REMOVE-KEYS 2024-06-22 00:33:28 -05:00

View File

@ -280,7 +280,8 @@ into one. Otherwise, parse it into an associative list."
;;; ———————————————————————————————————————— ;;; ————————————————————————————————————————
;; Note-worthy: See the above-defined DEFINE-YASON-ENCODE-SLOTS. ;; Note-worthy: See the above-defined DEFINE-YASON-ENCODE-SLOTS.
(defmethod yason:encode ((obj object) &optional (stream *standard-output*)) (defmethod yason:encode ((obj object) &optional (stream *standard-output*))
(yason:encode-object obj)) (yason:with-output (stream)
(yason:encode-object obj)))
(defmethod yason:encode-object ((obj object)) (defmethod yason:encode-object ((obj object))
(typecase *@context* (typecase *@context*
@ -301,8 +302,6 @@ into one. Otherwise, parse it into an associative list."
their sanitized string keys appropriate for ActivityVocabular custom. their sanitized string keys appropriate for ActivityVocabular custom.
A class with slots MAP-AWAY and COLLECTION-AGAIN would return A class with slots MAP-AWAY and COLLECTION-AGAIN would return
((MAP-AWAY . mapAway)(COLLECTION-AGAIN . collectionAgain))" ((MAP-AWAY . mapAway)(COLLECTION-AGAIN . collectionAgain))"
;; (alist-remove-keys
;; 'type
(alist-mapcdr #'camel-case (alist-mapcdr #'camel-case
(class-slots-alist class))) (class-slots-alist class)))
@ -356,12 +355,6 @@ items in each will be contained in the resultant list."
(mapcar (lambda (sym) (find-class sym)) (mapcar (lambda (sym) (find-class sym))
(find-registered-symbols str))) (find-registered-symbols str)))
(defun alist-remove-keys (item alist &optional (test #'equal))
"Remove cells from an associative list whose key TESTs as ITEM."
(cl:remove item alist
:test (lambda (a cell)
(funcall test a (car cell)))))
(defun alist-mapcdr (function alist) (defun alist-mapcdr (function alist)
"Apply a FUNCTION to all values (cdrs) of an ALISTs pairs. Returns a new ALIST "Apply a FUNCTION to all values (cdrs) of an ALISTs pairs. Returns a new ALIST
of the same keys, whose values are the results of FUNCTION." of the same keys, whose values are the results of FUNCTION."