Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Custom EDN tags #12

merged 1 commit into from

2 participants


Hi Nils,

I just noticed that custom tags defined in the data_readers.clj
file of an application are not handled by ring-middleware-format.

When a Clojure applications starts, tags defined in
data_readers.clj are loaded into the data-readers dynamic var.
However, the default behaviour of edn/read-string is to care only
about the tags in default-data-readers.

Passing {:readers data-readers} as the first argument to
edn/read-string solves this.

Would you like to merge this into master?

Thanks, Roman.

@ngrunwald ngrunwald merged commit 31500a7 into ngrunwald:master

thanks, merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 9, 2013
  1. @r0man
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/ring/middleware/format_params.clj
2  src/ring/middleware/format_params.clj
@@ -158,7 +158,7 @@
"Decode a clojure body. The body is merged into the params, so must be a map
or a vector of key value pairs. An empty body is safely handled."
(when-not (.isEmpty (.trim s))
- (edn/read-string s)))
+ (edn/read-string {:readers *data-readers*} s)))
(def clojure-request?
(make-type-request-pred #"^application/(vnd.+)?(x-)?(clojure|edn)"))
Something went wrong with that request. Please try again.