cljs-ajax
cljs-ajax copied to clipboard
qualified keywords not showing in json-request-format
Similar to https://github.com/JulianBirch/cljs-ajax/issues/260, but for the json-request-format.
Instead of losing namespace
(clj->js {:a/b 123}) => #js {:b 123}
Keep it in the final key str.
(defn- nsq-keyword-fn [k]
(let [ns (namespace k)
n (name k)]
(if ns
(str ns "/" n)
n)))
(clj->js {:a/b 123} :keyword-fn nsq-keyword-fn) => #js {"a/b" 123}