Fork me on GitHub
#ring
<
2017-05-30
>
petr.mensik17:05:59

Hello, just a quickie, is it possible to use some middleware to automatically process JSON array as Clojure vector?

:params {:contact_id "1", :companies "[1, 2]"},
Thanks a lot

petr.mensik17:05:43

I can do (get-in request [:params :companies]), however the array is interpreted as string

petr.mensik17:05:18

I am using wrap-json-params from ring.middleware.json

weavejester23:05:03

Yes, but you’ll need to write your own middleware, @pter.mensik