(in-package #:json) (defmacro obj (&rest fields) (let ((o (gensym)) (f (gensym))) (setf fields (mapcar (lambda (x) (cons 'list x)) fields)) `(let ((,o (make-hash-table :test #'equal :size ,(length fields)))) (dolist (,f ,(cons 'list fields)) (setf (gethash (car ,f) ,o) (cadr ,f))) ,o)))