Skip to content

Instantly share code, notes, and snippets.

@cemerick
Forked from stuarthalloway/gist:941069
Created April 26, 2011 00:08
Show Gist options
  • Save cemerick/941517 to your computer and use it in GitHub Desktop.
Save cemerick/941517 to your computer and use it in GitHub Desktop.
Generic clojure encoding map for rummage
;; needs rummage to use as-set instead of as-collection...
(def clojure-encoding-map
(assoc enc/all-strings
:encode (fn encode
([k] (pr-str k))
([k v]
[(pr-str k) (pr-str v)]))
:decode (fn
([k] (read-string k))
([k v] [(read-string k) (read-string v)]))))
@cemerick
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment