Skip to content

Instantly share code, notes, and snippets.

@markdingram
Created September 7, 2016 12:34
Show Gist options
  • Save markdingram/dc4f095f0e26a663f2fcb4415597c17e to your computer and use it in GitHub Desktop.
Save markdingram/dc4f095f0e26a663f2fcb4415597c17e to your computer and use it in GitHub Desktop.
;; see http://dev.clojure.org/jira/browse/CLJS-536
;; without this clj->js strips namespaces from JSON
(extend-type Keyword
IEncodeJS
(-clj->js [x]
(if (namespace x)
(str (namespace x) "/" (name x))
(name x)))
(-key->js [x]
(clj->js x)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment