blob: de213a413a31e04c5a1bbc7ccb64f1301d8ba457 (
plain)
1
2
3
4
5
6
7
8
9
|
(in-package #:json)
(defmacro obj (&rest fields)
(let ((o (gensym))
(f (gensym)))
`(let ((,o (make-hash-table :test #'equal :size ,(length fields))))
(dolist (,f ',fields)
(setf (gethash (car ,f) ,o) (cadr ,f)))
,o)))
|