   :allowed-methods [:get :put :delete]
   :available-media-types ["application/json"]
   :handle-ok (fn [context]
-               (json/generate-string
-                 (json-keys (::session context))))
+               (jsonify (::session context)))
   :delete! (fn [context]
              (shale.sessions/destroy-session id))
   :exists? (fn [context]

            [k v]))]
    (clojure.walk/postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m)))

(defn build-session-url [request id]
  (URL. (format "%s://%s:%s%s/%s"
                (name (:scheme request))

  :allowed-methods  [:get :post]
  :available-media-types  ["application/json"]
  :handle-ok (fn [context]
               (jsonify (shale.sessions/view-models nil)))
  :post! (fn [context] )
  :post-redirect true
  :location #(build-session-url (get % :request) (get % ::id)))
