   (js->clj (js/JSON.parse x)))
 
 
+(defn keywordize-keys [m]
+      (into {} (map (fn [[k v]]
+                        [(keyword k) (if (map? v) (keywordize-keys v) v)])
+                    m)))
+
 (defn local-storage-write
   ([k v] (local-storage-write k v false))
   ([k v stringify?]

          call-on-done (fn []
                         (let [status-code (.-status xhr)
                               get-parsed-response #(parse-json-string (.-responseText xhr))]
                           ; TODO: Fix this with a real log-out once the login bug is fixed and logout is implemented.
                           (if (= status-code 401)
                             (set! (-> js/window .-location) "/")
                             (on-done {:xhr xhr
                                       :status-code status-code
                                       :success? (and (>= status-code 200)
                                                      (< status-code 300))

            (.send xhr)))))))


(defn set-access-token-cookie [token]
      (.set goog.net.cookies "FCtoken" token 300))


(defn get-access-token-cookie []
      (.get goog.net.cookies "FCtoken"))


(defn ajax-orch [path arg-map & {:keys [service-prefix] :or {service-prefix "/service/api"}}]
