pedestal/pedestal — pull request #97 by r0man (2013-07-03 19:01:17+00:00)
Title: Make default-parser-map configurable.

People using custom data readers currently can't use the body-params
interceptor, because edn/read doesn't honor the *data-readers* var,
and there was no way to pass options into the edn-parser fn. A
similiar issue arises for people who want JSON maps with keywords as
keys, instead of the default strings.

This commit changes edn-parser, json-parser and form-parser (not
needed yet) to accept optional arguments that are passed to the actual
parser fns and return higher order fns that are configurable via
default-parser-map like this:

(body-params (default-parser-map :edn {:readers *data-readers*}))

Since data readers are very cool, and it is idiomatic Clojure to use
keywords to access maps there's still the question to use
*data-readers* as a default when parsing EDN and the keyword fn for
JSON.