Skip to content

Instantly share code, notes, and snippets.

@stuarthalloway
Created April 25, 2011 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stuarthalloway/941069 to your computer and use it in GitHub Desktop.
Save stuarthalloway/941069 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)]))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment