Skip to content

Instantly share code, notes, and snippets.

@dnaeon
Created May 30, 2018 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnaeon/9b5702968714549421853bbb6c39f233 to your computer and use it in GitHub Desktop.
Save dnaeon/9b5702968714549421853bbb6c39f233 to your computer and use it in GitHub Desktop.
walk/keywordize-keys strips reader tags
;;
;; When using clojure.walk/keywordize-keys record reader tags are stipped off
;;
user> (require '[clojure.walk :as walk])
nil
user> (defrecord Foo [x])
user.Foo
user> (def m {:foo (->Foo 1) :bar 2 :qux 3})
#'user/m
user> m
{:foo #user.Foo{:x 1}, :bar 2, :qux 3}
user> (walk/keywordize-keys m)
{:foo {:x 1}, :bar 2, :qux 3}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment