ngrunwald / ring-middleware-format

Ring middleware for parsing parameters and emitting responses in JSON or other formats
163 stars 49 forks source link

wrap-restful-response #33

Closed maxweber closed 9 years ago

maxweber commented 9 years ago

Hi,

first of all thank you for creating this great library. We've been using this library for the edn handling. However when I tried to enable support for JSON I discovered this issue: In https://github.com/ngrunwald/ring-middleware-format/blob/master/src/ring/middleware/format_response.clj#L337

   :transit-json (make-encoder wrap-transit-json-response
                               "application/transit+json" :binary)

it has to be something like this:

   :transit-json (make-encoder (make-transit-encoder :json {})
                               "application/transit+json" :binary)

Same for :transit-msgpack below only with :msgpack. At the moment I'm using the single middlewares for edn and transit, which work pretty fine.

Best regards

Max

Deraen commented 9 years ago

PR #26 would fix this.

ngrunwald commented 9 years ago

fixed by #26