anchor.diff:                    (json-obj data-string))
                (setf *sample-post-data* (json:decode-json-from-string data-string))
                (apply #'create-post (post-to-plist (json:decode-json-from-string data-string)))
  +             json-obj)))))
  +
  +(hunchentoot:define-easy-handler (create-post-handler :uri "/rest/create-comment") ()
  +  (setf (hunchentoot:content-type*) "application/json")
  +  (let* ((request-type (hunchentoot:request-method hunchentoot:*request*)))
  +    (cond  ((eq request-type :post)
  +           (let* ((data-string (hunchentoot:raw-post-data :force-text t))
  +                  (json-obj data-string))
  +             (print (post-to-plist (json:decode-json-from-string data-string)))
  +             (apply #'create-comment (post-to-plist (json:decode-json-from-string data-string)))
                json-obj)))))
   
   ;; Server io utilities 
  
positive.code: 
  (defclass comment ()
     ((comment-id :accessor comment-id :initform (get-comment-id))
      (post-id :initarg :post-id :accessor post-id :initform (error "Must have post id"))
      (comment-time :initform (timestamp-to-unix (now)))
      (author :initarg :author :accessor author :initform "anonymous")
      (text :initarg :text :accessor text :initform "")))
  
negative.code: (defun create-post (&key title summary text author)
    (push (make-instance 'post :title title :summary summary :text text :author author) *posts*))
  
  (defun create-comment (&key author text post-ref)
    (progn
      (let ((new-comment (make-instance 'comment :author author :text text :post-id post-ref)))
        (push new-comment *comments*)
        (dolist (lst *posts* nil)
          (with-slots (post-id comments) lst
            (if (eq post-ref post-id) (push new-comment comments)))))))
    
  (defun create-random-post ()
    (push (make-instance 'post) *posts*))
  