restful-format middleware can't serialize a root vector
denisidoro opened this issue · comments
Denis Isidoro commented
Dmitri Sotnikov commented
The middleware is using the following multimethod to serialize responses, and it's not doing anything special regarding maps and vectors handling. If you could investigate a bit more that would be really helpful, otherwise I'll try take a look when I get a chance.
Denis Isidoro commented
@yogthos, the problem is with deserialize-request, I guess:
cljs.user=> (js->clj (js/JSON.parse "{\"a\": 1}") :keywordize-keys true)
{:a 1}
cljs.user=> (js->clj (js/JSON.parse "[1 2 3]") :keywordize-keys true)
Unexpected number in JSON at position 3
Denis Isidoro commented
Nevermind. The problem was that I wasn't using -H "Accept: application/json"
in my curl command