Plaster
New
List
Login
common-lisp
default
anonymous
2024.05.29 17:37:28
(let ((yason:*symbol-key-encoder* 'yason:encode-symbol-as-lowercase) (yason:*list-encoder* 'yason:encode-alist)) (yason:with-output-to-string* () (yason:encode '((a . ((b . (1 2 3)))))))) => "{\"a\":{\"b\":[1,2,3]}}" (yason:with-output-to-string* () (yason:with-object () (yason:with-object-element ("a") (yason:with-object () (yason:with-object-element ("b") (yason:with-object ())))))) => "{\"a\":{\"b\":{}}}" (let ((yason:*symbol-key-encoder* 'yason:encode-symbol-as-lowercase) (yason:*list-encoder* 'yason:encode-alist)) (yason:with-output-to-string* () (yason:encode (list (cons 'a (list (cons 'b (make-hash-table)))))))) => "{\"a\":{\"b\":{}}}"
Raw
Annotate
Repaste
Edit